GlmSharp/GlmSharp5/Quat/quat.cs
/// <summary>
/// Creates a quaternion from an axis and an angle (in radians).
/// </summary>
Creates a quaternion from an axis and an angle (in radians).
Creates a quaternion from an axis and an angle ( in radians ) .
public static quat FromAxisAngle(float angle, vec3 v)
        {
            var s = Math.Sin((double)angle * 0.5);
            var c = Math.Cos((double)angle * 0.5);
            return new quat((float)((double)v.x * s), (float)((double)v.y * s), (float)((double)v.z * s), (float)c);
        }
public static quat FromAxisAngle ( float angle , vec3 v ) { var s = Math . Sin ( ( double ) angle * 0.5 ) ; var c = Math . Cos ( ( double ) angle * 0.5 ) ; return new quat ( ( float ) ( ( double ) v . x * s ) , ( float ) ( ( double ) v . y * s ) , ( float ) ( ( double ) v . z * s ) , ( float ) c ) ; }
Creates a quaternion from an axis and an angle (in radians).
Creates a quaternion from an axis and an angle ( in radians ) .
angle
float
v
vec3