Epok Engine

EPOK RUNTIME

epok::distance_squared_raw_2d

Function · 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.

Function

Squared distance in raw Q24; |position| <= 65536 keeps this inside 2^59.

Belongs to
epok
Header
world2d.hpp
Overloads
1

Declaration

Declaration
inline int64_t distance_squared_raw_2d(const Fixed* a, const Fixed* b)

Squared distance in raw Q24; |position| <= 65536 keeps this inside 2^59.

ParameterTypeMeaning
aconst Fixed *Not documented; consult the linked header.
bconst Fixed *Not documented; consult the linked header.

Returns: int64_t. Consult the linked header for its meaning.

Example sketch

C++ example
#include "world2d.hpp"

// Assume these named values have been initialized with valid data:
// const Fixed * a
// const Fixed * b

auto result = epok::distance_squared_raw_2d(a, b);

Trade-offs and warnings

Consult the linked header for this operation’s ownership, lifetime and failure behavior.

Declared in runtime/world2d.hpp:359

Related members