Closed unpacklo closed 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)
DOTS-2969.