func Scalar(w float64) Quaternion {
	return Quaternion{W: w}
}
Scalar returns a scalar-only Quaternion representation of a float (W,0,0,0)
package quaternion
import (
	"math"
)
func New(w, x, y, z float64) Quaternion {
	return Quaternion{W: w, X: x, Y: y, Z: z}
}
func Pure(x, y, z float64) Quaternion {
	return Quaternion{X: x, Y: y, Z: z}
}
type Vec3 struct {
	X float64
	Y float64
	Z float64
}
type Quaternion struct {
	W float64  
	X float64  
	Y float64  
	Z float64  
}
func (qin Quaternion) Conj() Quaternion {
	qin.X = -qin.X
	qin.Y = -qin.Y
	qin.Z = -qin.Z
	return qin
}
func (qin Quaternion) Norm2() float64 {
	return qin.W*qin.W + qin.X*qin.X + qin.Y*qin.Y + qin.Z*qin.Z
}
func (qin Quaternion) Neg() Quaternion {
	qin.W = -qin.W
	qin.X = -qin.X
	qin.Y = -qin.Y
	qin.Z = -qin.Z
	return qin
}
func (qin Quaternion) Norm() float64 {
	return math.Sqrt(qin.Norm2())
}