GearBlocks
The GearBlocks Lua scripting API
Static Public Member Functions | List of all members
SmashHammer.Scripting.MathProxy Class Reference

Some useful math functions. More...

Static Public Member Functions

static float DeltaAngle (float a, float b)
 Calculates the shortest angle between two angles.
 

Detailed Description

Some useful math functions.

Available in Lua via the "Math" global, for example:

local delta = Math.DeltaAngle( 45, 65 )

Member Function Documentation

◆ DeltaAngle()

static float SmashHammer.Scripting.MathProxy.DeltaAngle ( float  a,
float  b 
)
static

Calculates the shortest angle between two angles.

Parameters
aThe first angle, in degrees.
bThe second angle, in degrees.
Returns
A value between -179 and 180, in degrees.