mirror of
https://github.com/SFML/SFML.git
synced 2024-12-01 07:41:05 +08:00
Added asserts for cwiseDiv()
This commit is contained in:
parent
867d878c1c
commit
b8ca0f6523
@ -94,8 +94,8 @@ constexpr Vector2<T> Vector2<T>::cwiseMul(const Vector2<T>& rhs) const
|
||||
template <typename T>
|
||||
constexpr Vector2<T> Vector2<T>::cwiseDiv(const Vector2<T>& rhs) const
|
||||
{
|
||||
assert(rhs.x != 0);
|
||||
assert(rhs.y != 0);
|
||||
assert(rhs.x != 0 && "Vector2::cwiseDiv() cannot divide by 0");
|
||||
assert(rhs.y != 0 && "Vector2::cwiseDiv() cannot divide by 0");
|
||||
return Vector2<T>(x / rhs.x, y / rhs.y);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user