fixed some stuff added constexpr

This commit is contained in:
2024-10-20 00:25:03 +03:00
parent c45bca2e0b
commit ef24377049
8 changed files with 37 additions and 70 deletions

View File

@@ -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;
}
}