Implement constant Vector4s
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
#pragma once
|
||||
#include <J3ML/J3ML.h>
|
||||
#include <J3ML/LinearAlgebra.h>
|
||||
#include <cstddef>
|
||||
|
||||
namespace LinearAlgebra {
|
||||
using namespace J3ML;
|
||||
|
||||
|
||||
/// A 2D (x, y) ordered pair.
|
||||
class Vector2 {
|
||||
public:
|
||||
@@ -65,6 +69,11 @@ namespace LinearAlgebra {
|
||||
float Magnitude() const;
|
||||
static float Magnitude(const Vector2& of);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
bool IsFinite() const;
|
||||
static bool IsFinite(const Vector2& v);
|
||||
|
||||
|
@@ -9,6 +9,8 @@
|
||||
|
||||
namespace LinearAlgebra {
|
||||
|
||||
const Vector4 Vector4::Zero = {0,0,0,0};
|
||||
const Vector4 Vector4::NaN = {NAN, NAN, NAN, NAN};
|
||||
|
||||
Vector4::Vector4(): x(0), y(0), z(0), w(0)
|
||||
{}
|
||||
|
Reference in New Issue
Block a user