public AngleAxis(Quat _q) { Angle = (float)System.Math.Acos(_q.qs); float fSine = (float)System.Math.Sin(Angle); Angle *= 2.0f; Quat Temp = new Quat(_q); Temp.Normalize(); if (System.Math.Abs(fSine) > float.Epsilon) { Axis = Temp.qv / fSine; } else { Axis.MakeZero(); } }
// Access methods public void Zero() { qs = 0.0f; qv.MakeZero(); }
// Access methods public Plane Zero() { n.MakeZero(); d = 0.0f; return(this); }