mirror of
https://github.com/orange-cpp/omath.git
synced 2026-02-13 07:03:25 +00:00
fixed some stuff added constexpr
This commit is contained in:
@@ -8,23 +8,6 @@
|
||||
|
||||
namespace omath
|
||||
{
|
||||
|
||||
float Vector3::DistTo(const Vector3 &vOther) const
|
||||
{
|
||||
return (*this - vOther).Length();
|
||||
}
|
||||
|
||||
float Vector3::Length() const
|
||||
{
|
||||
return std::sqrt(Vector2::LengthSqr() + z * z);
|
||||
}
|
||||
|
||||
|
||||
float Vector3::Length2D() const
|
||||
{
|
||||
return Vector2::Length();
|
||||
}
|
||||
|
||||
Vector3 Vector3::ViewAngleTo(const Vector3 &other) const
|
||||
{
|
||||
const float distance = DistTo(other);
|
||||
@@ -83,12 +66,4 @@ namespace omath
|
||||
{
|
||||
return RightVector(pitch, yaw, roll).Cross(ForwardVector(pitch, yaw));
|
||||
}
|
||||
|
||||
|
||||
Vector3 Vector3::Normalized() const
|
||||
{
|
||||
const float length = this->Length();
|
||||
|
||||
return length != 0 ? *this / length : *this;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user