Trade-offs and warnings
Consult the linked header for this operation’s ownership, lifetime and failure behavior.
EPOK RUNTIME
Method · 1 overload
Declarations are extracted from the pinned headers. Examples and general guidance are generated sketches, not verified complete programs; consult the linked source and guides for the actual contract.
Performs `move toward` as part of the gameplay api module.
static Fixed move_toward(Fixed from,Fixed to,Fixed max_step)Performs `move toward` as part of the gameplay api module.
| Parameter | Type | Meaning |
|---|---|---|
from | Fixed | Not documented; consult the linked header. |
to | Fixed | Not documented; consult the linked header. |
max_step | Fixed | Not documented; consult the linked header. |
Returns: Fixed. Consult the linked header for its meaning.
#include "gameplay_api.hpp"
// Assume these named values have been initialized with valid data:
// Fixed from
// Fixed to
// Fixed max_step
auto result = epok::MathLibrary::move_toward(from, to, max_step);Consult the linked header for this operation’s ownership, lifetime and failure behavior.
Declared in runtime/gameplay_api.hpp:276
addAdds add as part of the gameplay api module.Methodbit_xorPerforms `bit xor` 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.MethodfloorRound toward negative infinity, including negative fractions and INT32_MIN.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_toward_degreesThe same approach on a circle: turns the short way and never overshoots.MethodscalePerforms `scale` as part of the gameplay api module.Method