Epok Engine

PSYQO SDK

psyqo::FixedPoint::FixedPoint<precisionBits, T, Scale>

constructor · 7 overloads

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.

constructor

Constructs `psyqo::FixedPoint` for the fixed point module.

Belongs to
psyqo::FixedPoint
Header
fixed-point.hh
Overloads
7

Declaration 1 of 7

Declaration
consteval FixedPoint(long double ld)

Constructs `psyqo::FixedPoint` for the fixed point module.

ParameterTypeMeaning
ldlong doubleNot documented; consult the linked header.

Returns: Nothing (void).

Example sketch

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

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

psyqo::FixedPoint value(ld);

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

Declaration 2 of 7

Declaration
constexpr FixedPoint() : value(0)

Constructs `psyqo::FixedPoint` for the fixed point module.

This overload takes no parameters.

Returns: Nothing (void).

Example sketch

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

psyqo::FixedPoint 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:170

Declaration 3 of 7

Declaration
constexpr FixedPoint(FixedPoint&&) = default

Constructs `psyqo::FixedPoint` for the fixed point module.

ParameterTypeMeaning
arg1FixedPoint<precisionBits, T, Scale> &&Not documented; consult the linked header.

Returns: Nothing (void).

Example sketch

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

// Assume these named values have been initialized with valid data:
// FixedPoint<precisionBits, T, Scale> && arg1

psyqo::FixedPoint value(arg1);

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

Declaration 4 of 7

Declaration
constexpr FixedPoint(T raw, Raw) : value(raw)

Constructs `psyqo::FixedPoint` for the fixed point module.

ParameterTypeMeaning
rawTNot documented; consult the linked header.
arg2RawNot documented; consult the linked header.

Returns: Nothing (void).

Example sketch

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

// Assume these named values have been initialized with valid data:
// T raw
// Raw arg2

psyqo::FixedPoint value(raw, arg2);

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

Declaration 5 of 7

Declaration
constexpr FixedPoint(const FixedPoint&) = default

Constructs `psyqo::FixedPoint` for the fixed point module.

ParameterTypeMeaning
arg1const FixedPoint<precisionBits, T, Scale> &Not documented; consult the linked header.

Returns: Nothing (void).

Example sketch

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

// Assume these named values have been initialized with valid data:
// const FixedPoint<precisionBits, T, Scale> & arg1

psyqo::FixedPoint value(arg1);

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

Declaration 6 of 7

Declaration
explicit constexpr FixedPoint(T integer, T fraction) : value(integer * scale + fraction)

Constructs a fixed point number from an integer and a fraction. Specifying a fraction different from 0 when the scale is not a power of 2 is undefined behavior.

ParameterTypeMeaning
integerTNot documented; consult the linked header.
fractionTNot documented; consult the linked header.

Returns: Nothing (void).

Example sketch

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

// Assume these named values have been initialized with valid data:
// T integer
// T fraction

psyqo::FixedPoint value(integer, fraction);

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

Declaration 7 of 7

template
Declaration
template <unsigned otherPrecisionBits = 12, std::integral U = int32_t> explicit FixedPoint(FixedPoint<otherPrecisionBits, U> other)

Construct a new Fixed Point number from a different fixed point number.

ParameterTypeMeaning
otherFixedPoint<otherPrecisionBits, U>Not documented; consult the linked header.

Returns: Nothing (void).

Example sketch

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

// Replace these template arguments with types or values accepted by the declaration:
// otherPrecisionBits, U

// Assume these named values have been initialized with valid data:
// FixedPoint<otherPrecisionBits, U> other

psyqo::FixedPoint& object = /* obtain a valid instance */;

object.FixedPoint<precisionBits, T, Scale><otherPrecisionBits, U>(other);

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

Related members