mirror of
https://github.com/orange-cpp/omath.git
synced 2026-02-13 07:03:25 +00:00
removed even float type from vector classes
This commit is contained in:
@@ -174,12 +174,12 @@ namespace omath
|
||||
return {x - v.x, y - v.y};
|
||||
}
|
||||
|
||||
[[nodiscard]] constexpr Vector2 operator*(const float fl) const noexcept
|
||||
[[nodiscard]] constexpr Vector2 operator*(const Type& fl) const noexcept
|
||||
{
|
||||
return {x * fl, y * fl};
|
||||
}
|
||||
|
||||
[[nodiscard]] constexpr Vector2 operator/(const float fl) const noexcept
|
||||
[[nodiscard]] constexpr Vector2 operator/(const Type& fl) const noexcept
|
||||
{
|
||||
return {x / fl, y / fl};
|
||||
}
|
||||
|
||||
@@ -185,7 +185,7 @@ namespace omath
|
||||
return {this->x - v.x, this->y - v.y, z - v.z};
|
||||
}
|
||||
|
||||
[[nodiscard]] constexpr Vector3 operator*(const float fl) const noexcept
|
||||
[[nodiscard]] constexpr Vector3 operator*(const Type& fl) const noexcept
|
||||
{
|
||||
return {this->x * fl, this->y * fl, z * fl};
|
||||
}
|
||||
@@ -195,7 +195,7 @@ namespace omath
|
||||
return {this->x * v.x, this->y * v.y, z * v.z};
|
||||
}
|
||||
|
||||
[[nodiscard]] constexpr Vector3 operator/(const float fl) const noexcept
|
||||
[[nodiscard]] constexpr Vector3 operator/(const Type& fl) const noexcept
|
||||
{
|
||||
return {this->x / fl, this->y / fl, z / fl};
|
||||
}
|
||||
@@ -245,7 +245,7 @@ namespace omath
|
||||
|
||||
[[nodiscard]] Vector3 view_angle_to(const Vector3& other) const noexcept
|
||||
{
|
||||
const float distance = distance_to(other);
|
||||
const auto distance = distance_to(other);
|
||||
const auto delta = other - *this;
|
||||
|
||||
return {angles::radians_to_degrees(std::asin(delta.z / distance)),
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace omath
|
||||
return *this;
|
||||
}
|
||||
|
||||
constexpr Vector4& operator*=(const float scalar) noexcept
|
||||
constexpr Vector4& operator*=(const Type& scalar) noexcept
|
||||
{
|
||||
Vector3<Type>::operator*=(scalar);
|
||||
w *= scalar;
|
||||
@@ -63,7 +63,7 @@ namespace omath
|
||||
return *this;
|
||||
}
|
||||
|
||||
constexpr Vector4& operator/=(const float scalar) noexcept
|
||||
constexpr Vector4& operator/=(const Type& scalar) noexcept
|
||||
{
|
||||
Vector3<Type>::operator/=(scalar);
|
||||
w /= scalar;
|
||||
|
||||
Reference in New Issue
Block a user