C# Class FootballSimulation.VectorExtensions

Provides extension methods for the Vector2 structure.
Show file Open project: PurdueSIGAI/Soccer

Public Methods

Method Description
ClampMagnitude ( this vector, float maxLength ) : System.Numerics.Vector2

Returns a copy of the Vector2 with its magnitude clamped to maxLength.

Projection ( this v, System.Numerics.Vector2 other ) : System.Numerics.Vector2

Rejection ( this v, System.Numerics.Vector2 other ) : System.Numerics.Vector2

Method Details

ClampMagnitude() public static method

Returns a copy of the Vector2 with its magnitude clamped to maxLength.
public static ClampMagnitude ( this vector, float maxLength ) : System.Numerics.Vector2
vector this The to clamp.
maxLength float The maximum of length of the returned .
return System.Numerics.Vector2

Projection() public static method

public static Projection ( this v, System.Numerics.Vector2 other ) : System.Numerics.Vector2
v this
other System.Numerics.Vector2
return System.Numerics.Vector2

Rejection() public static method

public static Rejection ( this v, System.Numerics.Vector2 other ) : System.Numerics.Vector2
v this
other System.Numerics.Vector2
return System.Numerics.Vector2