Arma Reforger Script API
Loading...
Searching...
No Matches
Static Public Member Functions | Static Protected Attributes | List of all members
SCR_Math Interface Reference

Static Public Member Functions

static float fmod (float dividend, float divisor)
 Takes two floats and returns the remainder after division.
 
static float LerpAngle (float a, float b, float t)
 Shortest linear interpolation between two angles.
 
static float DeltaAngle (float a, float b)
 Get shortest angle between two angles.
 
static int IntegerMask (int x)
 Minimum mask that can cover a provided number.
 
static float GetDistanceToStop (float speed, float deceleration)
 Get distance to stop with given deceleration.
 
static float GetSpeedToReachDistance (float distance, float deceleration)
 Get speed necessary to reach given distance with specified deceleration.
 
static float GetSpeedToReachDistanceInTime (float distance, float deceleration, float time)
 Get speed necessary to reach given distance with specified deceleration in specified time.
 
static RandomGenerator GetMathRandomGenerator ()
 Get the math random Generator.
 

Static Protected Attributes

const static ref RandomGenerator RANDOM_GENERATOR = new RandomGenerator()
 

Member Function Documentation

◆ DeltaAngle()

static float SCR_Math.DeltaAngle ( float  a,
float  b 
)
static

Get shortest angle between two angles.

Parameters
aStart angle in degrees
bTraget angle in degrees
Returns
Difference in degrees

◆ fmod()

static float SCR_Math.fmod ( float  dividend,
float  divisor 
)
static

Takes two floats and returns the remainder after division.

◆ GetDistanceToStop()

static float SCR_Math.GetDistanceToStop ( float  speed,
float  deceleration 
)
static

Get distance to stop with given deceleration.

◆ GetMathRandomGenerator()

static RandomGenerator SCR_Math.GetMathRandomGenerator ( )
static

Get the math random Generator.

Returns
Random Generator

◆ GetSpeedToReachDistance()

static float SCR_Math.GetSpeedToReachDistance ( float  distance,
float  deceleration 
)
static

Get speed necessary to reach given distance with specified deceleration.

◆ GetSpeedToReachDistanceInTime()

static float SCR_Math.GetSpeedToReachDistanceInTime ( float  distance,
float  deceleration,
float  time 
)
static

Get speed necessary to reach given distance with specified deceleration in specified time.

◆ IntegerMask()

static int SCR_Math.IntegerMask ( int  x)
static

Minimum mask that can cover a provided number.

Parameters
xPositive integer value
Returns
Minimum mask

◆ LerpAngle()

static float SCR_Math.LerpAngle ( float  a,
float  b,
float  t 
)
static

Shortest linear interpolation between two angles.

Parameters
aStart angle in degrees
bTraget angle in degrees
timeProgress in range [0,1]
Returns
Interpolated angle

Member Data Documentation

◆ RANDOM_GENERATOR

const static ref RandomGenerator SCR_Math.RANDOM_GENERATOR = new RandomGenerator()
staticprotected

The documentation for this interface was generated from the following file: