Making changes to Vector3 related stuff.
This commit is contained in:
parent
4fd8dfb9f1
commit
ce04edb8cb
4 changed files with 65 additions and 7 deletions
|
@ -5,6 +5,8 @@
|
|||
|
||||
using namespace igloo;
|
||||
|
||||
#include "math/Vector3.h"
|
||||
|
||||
// Testing headers:
|
||||
#include "tests/TestsVector3.h"
|
||||
|
||||
|
|
|
@ -7,9 +7,7 @@
|
|||
{
|
||||
Then( it_should_be_correct )
|
||||
{
|
||||
value1.x = 1.f;
|
||||
value1.y = 1.f;
|
||||
value1.z = 1.f;
|
||||
value1 = Vec3f( 1.f, 1.f, 1.f );
|
||||
|
||||
value1 *= 2.f;
|
||||
|
||||
|
@ -23,9 +21,7 @@
|
|||
{
|
||||
Then( it_should_be_correct )
|
||||
{
|
||||
value1.x = 2.f;
|
||||
value1.y = 2.f;
|
||||
value1.z = 2.f;
|
||||
value1 = Vec3f( 2.f, 2.f, 2.f );
|
||||
|
||||
value1 /= 2.f;
|
||||
|
||||
|
@ -35,4 +31,40 @@
|
|||
Vec3f value1;
|
||||
};
|
||||
|
||||
When( vector3_scalar_multiply_assignment )
|
||||
{
|
||||
Then( it_should_be_correct )
|
||||
{
|
||||
value1 = Vec3f( 1.f, 1.f, 1.f ) * 2.f;
|
||||
|
||||
Assert::That( value1, Equals( Vec3f( 2.f, 2.f, 2.f ) ) );
|
||||
}
|
||||
|
||||
Vec3f value1;
|
||||
};
|
||||
|
||||
When( vector3_scalar_divide_assignment )
|
||||
{
|
||||
Then( it_should_be_correct )
|
||||
{
|
||||
value1 = Vec3f( 2.f, 2.f, 2.f ) / 2.f;
|
||||
|
||||
Assert::That( value1, Equals( Vec3f( 1.f, 1.f, 1.f ) ) );
|
||||
}
|
||||
|
||||
Vec3f value1;
|
||||
};
|
||||
|
||||
When( vector3_set_to_zero )
|
||||
{
|
||||
Then( it_should_be_correct )
|
||||
{
|
||||
value1 = Vec3f::Zero;
|
||||
|
||||
Assert::That( value1, Equals( Vec3f( 0.f, 0.f, 0.f ) ) );
|
||||
}
|
||||
|
||||
Vec3f value1;
|
||||
};
|
||||
|
||||
#endif //__TESTSVECTOR3_H__
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue