Epok Engine

EPOK RUNTIME

epok::fixed_math::sqrt64

Function · 1 overload

Function

Truncating integer square root.

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

Declaration

Declaration
inline uint32_t sqrt64(uint64_t v)

Truncating integer square root.

ParameterTypeMeaning
vuint64_tValue supplied for v. Keep referenced or pointed-to data valid for the complete call.

Returns: uint32_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:
// uint64_t v

auto result = epok::fixed_math::sqrt64(v);

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:9

Related members