struct
MiriVec2
- Module
- Miri
- Header
#include "Miri/Core/MiriMath.h"- Namespace
Miri
Properties
| Type | Name | Description |
|---|---|---|
float | X | Default 0.0f. |
float | Y | Default 0.0f. |
static const MiriVec2 | Zero | |
static const MiriVec2 | One |
Constructors
| Signature | Name | Description |
|---|---|---|
MiriVec2() = default | MiriVec2 | |
constexpr MiriVec2(float x, float y) : X(x), Y(y) | MiriVec2 | |
constexpr explicit MiriVec2(float scalar) : X(scalar), Y(scalar) | MiriVec2 |
Public functions
| Returns | Name | Description |
|---|---|---|
MiriVec2 | operator+ | |
MiriVec2 | operator- | |
MiriVec2 | operator* | |
MiriVec2 | operator/ | |
MiriVec2 | operator* | |
MiriVec2& | operator+= | |
MiriVec2& | operator-= | |
MiriVec2& | operator*= | |
bool | operator== | |
bool | operator!= | |
float | Length | |
float | LengthSquared | |
MiriVec2 | Normalized | |
float | Dot | |
float | Cross | |
MiriVec2 | Lerp | |
MiriVec2 | Min | |
MiriVec2 | Max |
Function details
MiriVec2
C++
MiriVec2() = defaultMiriVec2
C++
constexpr MiriVec2(float x, float y) : X(x), Y(y)MiriVec2
C++
constexpr explicit MiriVec2(float scalar) : X(scalar), Y(scalar)operator+
C++
MiriVec2 operator+(const MiriVec2& other) constoperator-
C++
MiriVec2 operator-(const MiriVec2& other) constoperator*
C++
MiriVec2 operator*(float scalar) constoperator/
C++
MiriVec2 operator/(float scalar) constoperator*
C++
MiriVec2 operator*(const MiriVec2& other) constoperator+=
C++
MiriVec2& operator+=(const MiriVec2& other)operator-=
C++
MiriVec2& operator-=(const MiriVec2& other)operator*=
C++
MiriVec2& operator*=(float scalar)operator==
C++
bool operator==(const MiriVec2& other) constoperator!=
C++
bool operator!=(const MiriVec2& other) constLength
C++
float Length() constLengthSquared
C++
float LengthSquared() constNormalized
C++
MiriVec2 Normalized() constDot
C++
static float Dot(const MiriVec2& a, const MiriVec2& b)Cross
C++
static float Cross(const MiriVec2& a, const MiriVec2& b)Lerp
C++
static MiriVec2 Lerp(const MiriVec2& a, const MiriVec2& b, float t)Min
C++
static MiriVec2 Min(const MiriVec2& a, const MiriVec2& b)Max
C++
static MiriVec2 Max(const MiriVec2& a, const MiriVec2& b)Generated from Miri/Core/MiriMath.h via miri.json · Dec 5, 2026Version 1.1.0