resonance 1.0.1
Loading...
Searching...
No Matches
vector2.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Vector2
 Two-component vector, used for texture coordinates. More...

Namespaces

namespace  Rnd
 The rendering engine.

Functions

void Rnd::Add (const Vector2 &a, const Vector2 &b, Vector2 &out)
 Add two two-component vectors.
void Rnd::Multiply (const Vector2 &v, float flScale, Vector2 &out)
 Scale a two-component vector.
void Rnd::Negate (const Vector2 &v, Vector2 &out)
 Negate a two-component vector.
void Rnd::Normalize (const Vector2 &v, Vector2 &out)
 Scale a two-component vector to unit length.
float Rnd::Length (const Vector2 &v)
 Report the length of a two-component vector.
void SubVec2 (const float *pA, const float *pB, float *pOut)
 Subtract one two-component vector from another.

Function Documentation

◆ SubVec2()

void SubVec2 ( const float * pA,
const float * pB,
float * pOut )

Subtract one two-component vector from another.

The destination may alias either source because both loads precede both stores. The routine reads y before x and stores y before x, with the x store in the return delay slot, matching Rnd::Add().

Parameters
pAThe vector subtracted from.
pBThe vector subtracted.
pOutReceives pA minus pB, and may alias either input.
Ghidra address:
NTSC-U/C: 0x004bec40
Ghidra address:
PAL: 0x004fccc8