mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-14 10:48:36 +12:00
parent
a36f25c7b2
commit
9d74d42f2a
1 changed files with 5 additions and 5 deletions
|
@ -83,28 +83,28 @@ struct vector3_base : public position3_base<T>
|
||||||
{
|
{
|
||||||
using position3_base<T>::position3_base;
|
using position3_base<T>::position3_base;
|
||||||
|
|
||||||
vector3_base<T>(T x, T y, T z)
|
vector3_base(T x, T y, T z)
|
||||||
{
|
{
|
||||||
this->x = x;
|
this->x = x;
|
||||||
this->y = y;
|
this->y = y;
|
||||||
this->z = z;
|
this->z = z;
|
||||||
}
|
}
|
||||||
|
|
||||||
vector3_base<T>(const position3_base<T>& other)
|
vector3_base(const position3_base<T>& other)
|
||||||
{
|
{
|
||||||
this->x = other.x;
|
this->x = other.x;
|
||||||
this->y = other.y;
|
this->y = other.y;
|
||||||
this->z = other.z;
|
this->z = other.z;
|
||||||
}
|
}
|
||||||
|
|
||||||
T dot(const vector3_base<T>& rhs) const
|
T dot(const vector3_base& rhs) const
|
||||||
{
|
{
|
||||||
return (this->x * rhs.x) + (this->y * rhs.y) + (this->z * rhs.z);
|
return (this->x * rhs.x) + (this->y * rhs.y) + (this->z * rhs.z);
|
||||||
}
|
}
|
||||||
|
|
||||||
T distance(const vector3_base<T>& rhs) const
|
T distance(const vector3_base& rhs) const
|
||||||
{
|
{
|
||||||
const vector3_base<T> d = *this - rhs;
|
const vector3_base d = *this - rhs;
|
||||||
return d.dot(d);
|
return d.dot(d);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue