NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
vec.h
Go to the documentation of this file.
1#pragma once
2#include <types.h>
4
5#ifdef __cplusplus
6extern "C" {
7#endif
8
11
13typedef struct {
14 float x, y;
15} Vec2;
16
18typedef struct {
19 float x, y, z;
20} Vec;
21
23typedef struct {
24 s16 x, y, z;
25} S16Vec;
26
27void PSVECAdd(const Vec *v1, const Vec *v2, Vec *out);
28void PSVECSubtract(const Vec *v1, const Vec *v2, Vec *out);
29void PSVECScale(const Vec *in, Vec *out, float scale);
30f32 PSVECMag(const Vec *v);
31
33
34#ifdef __cplusplus
35}
36#endif
f32 PSVECMag(const Vec *v)
Computes the magnitude of a vector.
void PSVECSubtract(const Vec *v1, const Vec *v2, Vec *out)
Subtracts vector v2 from vector v1.
void PSVECAdd(const Vec *v1, const Vec *v2, Vec *out)
Sums two vectors together.
void PSVECScale(const Vec *in, Vec *out, float scale)
Multiplies a vector by a scalar.
A three-dimensional short vector.
Definition vec.h:23
A two-dimensional floating point vector.
Definition vec.h:13
A three-dimensional floating point vector.
Definition vec.h:18