Epok Engine

EPOK RUNTIME

epok::MathLibrary

Struct

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.

Struct

Struct declared by the gameplay-api module for the gameplay api module.

Namespace
epok
Header
gameplay_api.hpp
Include
#include "gameplay_api.hpp"
Module
gameplay-api
Source
runtime/gameplay_api.hpp:244

Basic usage

This generated sketch illustrates syntax for reaching the type; adapt it to the actual API contract. 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.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_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.Methodtruncate_unsignedTruncate whole positive units; negative values saturate at zero.Methodvector3Performs `vector3` as part of the gameplay api module.Methodwrap_degrees0 <= result < 360.Methodwrapping_multiplyExplicit modulo-2^32 multiplication for hashes and bit arithmetic.Method