Skip to content

Commit f179aea

Browse files
committed
removed even float type from vector classes
1 parent 1196bb8 commit f179aea

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

include/omath/vector2.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,12 +174,12 @@ namespace omath
174174
return {x - v.x, y - v.y};
175175
}
176176

177-
[[nodiscard]] constexpr Vector2 operator*(const float fl) const noexcept
177+
[[nodiscard]] constexpr Vector2 operator*(const Type& fl) const noexcept
178178
{
179179
return {x * fl, y * fl};
180180
}
181181

182-
[[nodiscard]] constexpr Vector2 operator/(const float fl) const noexcept
182+
[[nodiscard]] constexpr Vector2 operator/(const Type& fl) const noexcept
183183
{
184184
return {x / fl, y / fl};
185185
}

include/omath/vector3.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ namespace omath
185185
return {this->x - v.x, this->y - v.y, z - v.z};
186186
}
187187

188-
[[nodiscard]] constexpr Vector3 operator*(const float fl) const noexcept
188+
[[nodiscard]] constexpr Vector3 operator*(const Type& fl) const noexcept
189189
{
190190
return {this->x * fl, this->y * fl, z * fl};
191191
}
@@ -195,7 +195,7 @@ namespace omath
195195
return {this->x * v.x, this->y * v.y, z * v.z};
196196
}
197197

198-
[[nodiscard]] constexpr Vector3 operator/(const float fl) const noexcept
198+
[[nodiscard]] constexpr Vector3 operator/(const Type& fl) const noexcept
199199
{
200200
return {this->x / fl, this->y / fl, z / fl};
201201
}
@@ -245,7 +245,7 @@ namespace omath
245245

246246
[[nodiscard]] Vector3 view_angle_to(const Vector3& other) const noexcept
247247
{
248-
const float distance = distance_to(other);
248+
const auto distance = distance_to(other);
249249
const auto delta = other - *this;
250250

251251
return {angles::radians_to_degrees(std::asin(delta.z / distance)),

include/omath/vector4.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ namespace omath
4747
return *this;
4848
}
4949

50-
constexpr Vector4& operator*=(const float scalar) noexcept
50+
constexpr Vector4& operator*=(const Type& scalar) noexcept
5151
{
5252
Vector3<Type>::operator*=(scalar);
5353
w *= scalar;
@@ -63,7 +63,7 @@ namespace omath
6363
return *this;
6464
}
6565

66-
constexpr Vector4& operator/=(const float scalar) noexcept
66+
constexpr Vector4& operator/=(const Type& scalar) noexcept
6767
{
6868
Vector3<Type>::operator/=(scalar);
6969
w /= scalar;

0 commit comments

Comments
 (0)