FerretEngine/src/Utils/FeMath.cs
/// <summary>
/// Gets a length and a direction, and returns the point
/// where x is cos(direction) * length and y is sin(direction) * length.
/// </summary>
/// <param name="length"></param>
/// <param name="dir"></param>
/// <returns></returns>
/// <exception cref="NotImplementedException"></exception>
Gets a length and a direction, and returns the point
where x is cos(direction) * length and y is sin(direction) * length.
Gets a length and a direction and returns the point where x is cos ( direction ) * length and y is sin ( direction ) * length .
[MethodImpl(MethodImplOptions.AggressiveInlining)]
        public static Vector2 LenDir(float length, float dir)
        {
            return new Vector2(FeMath.Cos(dir), FeMath.Sin(dir)) * length;
        }
[ MethodImpl ( MethodImplOptions . AggressiveInlining ) ] public static Vector2 LenDir ( float length , float dir ) { return new Vector2 ( FeMath . Cos ( dir ) , FeMath . Sin ( dir ) ) * length ; }
Gets a length and a direction, and returns the point
where x is cos(direction) * length and y is sin(direction) * length.
Gets a length and a direction and returns the point where x is cos ( direction ) * length and y is sin ( direction ) * length .
None
None
length
float
None
dir
float
None