Example #1
0
        Rotation(double angle, Direction direction)
        {
            if (Accuracy.LengthIsZero(angle)) {
                angle = 0;
                direction = Direction.Zero;
            }

            h = Quaternion.Create(Math.Cos(angle / 2), direction.UnitVector * Math.Sin(angle / 2));
        }
Example #2
0
 Rotation(Quaternion h)
 {
     this.h = h / h.Magnitude;
 }