removed even float type from vector classes

This commit is contained in:
2025-05-13 09:22:23 +03:00
parent 1196bb86b4
commit f179aea4d7
3 changed files with 7 additions and 7 deletions

View File

@@ -174,12 +174,12 @@ namespace omath
return {x - v.x, y - v.y}; 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}; 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}; return {x / fl, y / fl};
} }

View File

@@ -185,7 +185,7 @@ namespace omath
return {this->x - v.x, this->y - v.y, z - v.z}; 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}; 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}; 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}; 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 [[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; const auto delta = other - *this;
return {angles::radians_to_degrees(std::asin(delta.z / distance)), return {angles::radians_to_degrees(std::asin(delta.z / distance)),

View File

@@ -47,7 +47,7 @@ namespace omath
return *this; return *this;
} }
constexpr Vector4& operator*=(const float scalar) noexcept constexpr Vector4& operator*=(const Type& scalar) noexcept
{ {
Vector3<Type>::operator*=(scalar); Vector3<Type>::operator*=(scalar);
w *= scalar; w *= scalar;
@@ -63,7 +63,7 @@ namespace omath
return *this; return *this;
} }
constexpr Vector4& operator/=(const float scalar) noexcept constexpr Vector4& operator/=(const Type& scalar) noexcept
{ {
Vector3<Type>::operator/=(scalar); Vector3<Type>::operator/=(scalar);
w /= scalar; w /= scalar;