Epok Engine

PSYQO SDK

psyqo::fixed_point_literals::operator""_fp

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

User-defined literal for constructing a 20.12 fixed point number.

Belongs to
psyqo::fixed_point_literals
Header
fixed-point.hh
Overloads
1

Declaration

Declaration
consteval FixedPoint<> operator""_fp(long double value)

User-defined literal for constructing a 20.12 fixed point number.

ParameterTypeMeaning
valuelong doubleThe value to construct the fixed point number from.

Returns: FixedPoint<> — consteval FixedPoint<> The constructed fixed point number.

Example sketch

C++ example
#include "psyqo/fixed-point.hh"

// Assume these named values have been initialized with valid data:
// long double value

auto result = psyqo::fixed_point_literals::operator""_fp(value);

Trade-offs and warnings

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

Declared in https://github.com/epokengine/nugget/blob/4a01183295182b8e7702c908e1efaaa8f4538ffd/psyqo/fixed-point.hh:525

Related members