Epok Engine

PSYQO SDK

psyqo::SoftMath::matrixVecMul3z

Function · 2 overloads

Function

Multiply a 3x3 matrix by a 3D vector, returning only the z component.

Belongs to
psyqo::SoftMath
Header
soft-math.hh
Overloads
2

Declaration 1 of 2

Declaration
FixedPoint<> matrixVecMul3z(const Matrix33 &m, const Vec3 &v)

Multiply a 3x3 matrix by a 3D vector, returning only the z component.

ParameterTypeMeaning
mconst Matrix33 &The matrix.
vconst Vec3 &The vector.

Returns: FixedPoint<> — FixedPoint<> The z component of the result.

Example

C++ example
#include "psyqo/soft-math.hh"

// Assume these named values have been initialized with valid data:
// const Matrix33 & m
// const Vec3 & v

auto result = psyqo::SoftMath::matrixVecMul3z(m, v);

Why use it

Fixed-point inputs keep console behavior deterministic and avoid software floating-point work.

Trade-offs and warnings

Stay within the documented range and account for quantization before chaining several operations. Pointer/reference arguments are borrowed unless the source contract says otherwise; keep them valid for the complete operation and never assume null is accepted.

Declared in https://github.com/pcsx-redux/nugget/blob/6186b131aacc5853a9161fb076ed34ffe504552d/psyqo/soft-math.hh:134

Declaration 2 of 2

static
Declaration
static inline FixedPoint<> matrixVecMul3z(const Matrix33 *m, const Vec3 *v)

Performs `matrix vec mul3z` as part of the soft math module.

ParameterTypeMeaning
mconst Matrix33 *Value supplied for m. Keep referenced or pointed-to data valid for the complete call.
vconst Vec3 *Value supplied for v. Keep referenced or pointed-to data valid for the complete call.

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

Example

C++ example
#include "psyqo/soft-math.hh"

// Assume these named values have been initialized with valid data:
// const Matrix33 * m
// const Vec3 * v

auto result = psyqo::SoftMath::matrixVecMul3z(m, v);

Why use it

Fixed-point inputs keep console behavior deterministic and avoid software floating-point work.

Trade-offs and warnings

Stay within the documented range and account for quantization before chaining several operations. Pointer/reference arguments are borrowed unless the source contract says otherwise; keep them valid for the complete operation and never assume null is accepted.

Declared in https://github.com/pcsx-redux/nugget/blob/6186b131aacc5853a9161fb076ed34ffe504552d/psyqo/soft-math.hh:135

Related members