Unity-Technologies / Unity.Mathematics

The C# math library used in Unity providing vector types and math functions with a shader like syntax
Other
1.38k stars 156 forks source link

Fix documentation for Rotate() which mentions degrees when it really uses radians #178

Closed unpacklo closed 3 years ago

unpacklo commented 3 years ago

here's another one

        /// <summary>Returns a float2x2 matrix representing a counter-clockwise rotation of angle degrees.</summary>
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        public static float2x2 Rotate(float angle)
        {
            float s, c;
            sincos(angle, out s, out c);
            return float2x2(c, -s,
                            s,  c);
        }

a counter-clockwise rotation of angle degrees (Radians in fact)

Originally posted by @lieene in https://github.com/Unity-Technologies/Unity.Mathematics/pull/175#issuecomment-705519496