EPOK RUNTIME
epok::MathLibrary
Struct
Struct
Struct declared by the gameplay-api module for the gameplay api module.
Basic usage
This minimal snippet shows the normal syntax for reaching the type. Open a member below for an operation-specific example.
C++ example
#include "gameplay_api.hpp"
epok::MathLibrary& value = /* obtain a valid instance from your game */;Static methods
addAdds add as part of the gameplay api module.MethodclampPerforms `clamp` as part of the gameplay api module.Methodcosine_degreesPerforms `cosine degrees` as part of the gameplay api module.Methoddelta_degreesShortest signed turn from one heading to another, in -180..180.Methodheading_degreesHeading of a planar vector in degrees, measured from +y towards +x, so a stick pushed forward reads 0 and a stick pushed right reads 90.MethodlengthPerforms `length` as part of the gameplay api module.Methodlength2Performs `length2` as part of the gameplay api module.MethodlerpPerforms `lerp` as part of the gameplay api module.Methodmove_towardPerforms `move toward` as part of the gameplay api module.Methodmove_toward_degreesThe same approach on a circle: turns the short way and never overshoots.MethodscalePerforms `scale` as part of the gameplay api module.Methodsine_degreesTrigonometry, roots and angle arithmetic in the engine's own Q12 form.MethodsmoothstepPerforms `smoothstep` as part of the gameplay api module.Methodsquare_rootPerforms `square root` as part of the gameplay api module.Methodstick_dead_zoneThe engine's standard analog dead zone, as a share of full deflection.Methodstick_intentPerforms `stick intent` as part of the gameplay api module.MethodsubtractPerforms `subtract` as part of the gameplay api module.Methodvector3Performs `vector3` as part of the gameplay api module.Methodwrap_degrees0 <= result < 360.Method