Skip to content

Commit 71458e3

Browse files
committed
Update couple more NiPoint3 operators
1 parent 1858940 commit 71458e3

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

include/RE/N/NiPoint3.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ namespace RE
1919
bool operator<(const NiPoint3& a_rhs) const;
2020
NiPoint3 operator+(const NiPoint3& a_rhs) const;
2121
NiPoint3 operator-(const NiPoint3& a_rhs) const;
22-
float operator*(const NiPoint3& a_rhs) const;
22+
NiPoint3 operator*(const NiPoint3& a_rhs) const;
23+
NiPoint3 operator/(const NiPoint3& a_rhs) const;
2324
NiPoint3 operator+(float a_scalar) const;
2425
NiPoint3 operator-(float a_scalar) const;
2526
NiPoint3 operator*(float a_scalar) const;

src/RE/N/NiPoint3.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,14 @@ namespace RE
3939
return NiPoint3(x - a_rhs.x, y - a_rhs.y, z - a_rhs.z);
4040
}
4141

42-
float NiPoint3::operator*(const NiPoint3& a_rhs) const
42+
NiPoint3 NiPoint3::operator*(const NiPoint3& a_rhs) const
4343
{
44-
return x * a_rhs.x + y * a_rhs.y + z * a_rhs.z;
44+
return NiPoint3(x * a_rhs.x, y * a_rhs.y, z * a_rhs.z);
45+
}
46+
47+
NiPoint3 NiPoint3::operator/(const NiPoint3& a_rhs) const
48+
{
49+
return NiPoint3(x / a_rhs.x, y / a_rhs.y, z / a_rhs.z);
4550
}
4651

4752
NiPoint3 NiPoint3::operator+(float a_scalar) const

0 commit comments

Comments
 (0)