General bug fixes (#142)

* Core/Bitset: Fix TestAll method

* Fix documentation

* Fix color and their conversions

* Core/ByteStream: Fix return of Write

* Fix compiler warnings

* Math/Algorithm: Fix angle normalization

* Math/BoundingVolume: Fix lerp

* Math: Fix relation between Matrix4 and Quaternion

* More tests

* X11/Window: Fix mouse moved event generated when doing Mouse::SetPosition

* Update ChangeLog

* Should fix compilation on Windows

* Should fix compilation on Windows

Forgot to include array for Windows
This commit is contained in:
Gawaboumga
2017-11-21 12:16:46 +01:00
committed by Jérôme Leclercq
parent f2506ee918
commit f991a9529e
52 changed files with 1287 additions and 272 deletions

View File

@@ -1,6 +1,7 @@
#include <Nazara/Math/Vector3.hpp>
#include <Catch/catch.hpp>
#include <Nazara/Math/Vector2.hpp>
#include <Nazara/Math/Vector4.hpp>
SCENARIO("Vector3", "[MATH][VECTOR3]")
@@ -97,4 +98,24 @@ SCENARIO("Vector3", "[MATH][VECTOR3]")
}
}
}
GIVEN("Two vectors")
{
Nz::Vector2f unit = Nz::Vector2f::Unit();
Nz::Vector3f smaller(-1.f, unit);
float data[3] = { 1.f, unit.x, unit.y };
Nz::Vector3f bigger(data);
WHEN("We combine divisions and multiplications")
{
Nz::Vector3f result = smaller / bigger;
result *= bigger;
THEN("We should get the identity")
{
REQUIRE(result == smaller);
}
}
}
}