Why use it
It provides direct, allocation-conscious access to the gameplay api module. No exception-based error path is implied by the signature.
EPOK RUNTIME
Method · 1 overload
Performs `square root` as part of the gameplay api module.
static Fixed square_root(Fixed value)Performs `square root` as part of the gameplay api module.
| Parameter | Type | Meaning |
|---|---|---|
value | Fixed | Value supplied for value. Keep referenced or pointed-to data valid for the complete call. |
Returns: Fixed. Check the value before continuing when it represents success, availability or a resource handle.
#include "gameplay_api.hpp"
// Assume these named values have been initialized with valid data:
// Fixed value
auto result = epok::MathLibrary::square_root(value);It provides direct, allocation-conscious access to the gameplay api module. No exception-based error path is implied by the signature.
Call it only in the lifecycle phase described by the module. Validate indices, capacities and object state before use.
Declared in runtime/gameplay_api.hpp:183
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.Method