Epok Engine

EPOK RUNTIME

epok::fixed_math::powq

Function · 1 overload

Function

`t` raised to `n` in Q12.

Belongs to
epok::fixed_math
Header
fixed_math.hpp
Overloads
1

Declaration

Declaration
inline int32_t powq(int32_t t,int n)

`t` raised to `n` in Q12.

ParameterTypeMeaning
tint32_tValue supplied for t. Keep referenced or pointed-to data valid for the complete call.
nintValue supplied for n. Keep referenced or pointed-to data valid for the complete call.

Returns: int32_t. Check the value before continuing when it represents success, availability or a resource handle.

Example

C++ example
#include "fixed_math.hpp"

// Assume these named values have been initialized with valid data:
// int32_t t
// int n

auto result = epok::fixed_math::powq(t, n);

Why use it

It provides direct, allocation-conscious access to shared Q12 integer math primitives. No exception-based error path is implied by the signature.

Trade-offs and warnings

Call it only in the lifecycle phase described by the module. Validate indices, capacities and object state before use.

Declared in runtime/fixed_math.hpp:12

Related members