Monobjc.GLKit.GLKQuaternion.MakeWithAngleAndAxis C# (CSharp) Method

MakeWithAngleAndAxis() public static method

Creates a quaternion that represents a rotation around an axis.

Original signature is 'GLKQuaternion GLKQuaternionMakeWithAngleAndAxis ( float radians, float x, float y, float z );'

Available in OS X x0.8 and later.

public static MakeWithAngleAndAxis ( float radians, float x, float y, float z ) : GLKQuaternion
radians float MISSING
x float MISSING
y float MISSING
z float MISSING
return GLKQuaternion
		public static GLKQuaternion MakeWithAngleAndAxis (float radians, float x, float y, float z)
		{
			float halfAngle = radians * 0.5f;
			float scale = (float)Math.Sin (halfAngle);
			GLKQuaternion q = new GLKQuaternion (scale * x, scale * y, scale * z, (float)Math.Cos (halfAngle));
			return q;
		}