C# Class FSO.Common.Utils.DirectionUtils

Mostrar archivo Open project: RHY3756547/FreeSO

Public Methods

Method Description
Difference ( double a, double b ) : double

Finds the difference between two radian directions.

Normalize ( double dir ) : double

Normalizes a direction to the range -PI through PI.

NormalizeDegrees ( double dir ) : double

Normalizes a direction in degrees to the range -180 through 180.

PosMod ( double x, double m ) : double

Calculates the mathematical modulus of a value.

Method Details

Difference() public static method

Finds the difference between two radian directions.
public static Difference ( double a, double b ) : double
a double The direction to subtract from.
b double The direction to subtract.
return double

Normalize() public static method

Normalizes a direction to the range -PI through PI.
public static Normalize ( double dir ) : double
dir double The direction to normalize.
return double

NormalizeDegrees() public static method

Normalizes a direction in degrees to the range -180 through 180.
public static NormalizeDegrees ( double dir ) : double
dir double The direction to normalize.
return double

PosMod() public static method

Calculates the mathematical modulus of a value.
public static PosMod ( double x, double m ) : double
x double The number to mod.
m double
return double