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
Shortest signed turn from one heading to another, in -180..180.
static Fixed delta_degrees(Fixed from,Fixed to)Shortest signed turn from one heading to another, in -180..180.
| Parameter | Type | Meaning |
|---|---|---|
from | Fixed | Value supplied for from. Keep referenced or pointed-to data valid for the complete call. |
to | Fixed | Value supplied for to. 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 from
// Fixed to
auto result = epok::MathLibrary::delta_degrees(from, to);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:189
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.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.Method