Gravity Engine  1.5
Unity Asset for Gravity
NUtils Class Reference

Static Public Member Functions

static double GetEnergy (int numBodies, ref double[] m, ref double[,] r, ref double[,] v)
 Calculate the energy of the system Used internally by GravityEngine. Use GravityEngine.GetEnergy() from developer scripts. More...
 
static float GaussianValue (float mean, float stdDev)
 
static float AngleFromSinCos (float sinValue, float cosValue)
 Given the Sin and Cos of an angle return the correct value in 0..2 PI radians. More...
 
static float DegressMod360 (float angle)
 Degress modules 360f (angle in 0..360) More...
 
static bool VectorNaN (Vector3 v)
 

Member Function Documentation

static float NUtils.AngleFromSinCos ( float  sinValue,
float  cosValue 
)
static

Given the Sin and Cos of an angle return the correct value in 0..2 PI radians.

Returns
The from sin cos.
Parameters
sinValueSin value.
cosValueCos value.
static float NUtils.DegressMod360 ( float  angle)
static

Degress modules 360f (angle in 0..360)

Returns
The mod360.
Parameters
angleAngle.
static double NUtils.GetEnergy ( int  numBodies,
ref double[]  m,
ref double  r[,],
ref double  v[,] 
)
static

Calculate the energy of the system Used internally by GravityEngine. Use GravityEngine.GetEnergy() from developer scripts.

Returns
The energy.
Parameters
numBodiesNumber bodies.
mM.
rThe red component.
vV.

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