add()
|
- |
3 |
should be available
|
- |
|
should have the alias normalize()
|
- |
|
should throw an Error when the vectors have a different number of coordinates
|
- |
|
clone()
|
- |
2 |
should be available
|
- |
|
should properly clone
|
- |
|
divide()
|
- |
6 |
should be available
|
- |
|
should have the alias div()
|
- |
|
should return the correct value when dividing a 2D Vector with a scaler
|
- |
|
should return the correct value when dividing a 3D Vector with a scaler
|
- |
|
should return the correct value when dividing two 2D Vectors
|
- |
|
should throw an error when two Vectors with different length are divided
|
- |
|
dotProduct()
|
- |
6 |
should be available
|
- |
|
should have the alias dot()
|
- |
|
should return the correct value for two 1D vectors
|
- |
|
should return the correct value for two 2D vectors
|
- |
|
should return the correct value for two 3D vectors
|
- |
|
should throw an Error when the vectors have a different number of coordinates
|
- |
|
getCoordinate()
|
- |
4 |
should be available
|
- |
|
should have the alias getCoord()
|
- |
|
should return the correct value
|
- |
|
should return undefined for a non-existing coordinate
|
- |
|
getDirection()
|
- |
4 |
should be available
|
- |
|
should have the alias getDir()
|
- |
|
should return the correct value
|
- |
|
should throw an error for non-2D Vectors
|
- |
|
getDistanceTo()
|
- |
3 |
should be available
|
- |
|
should have the alias getDistance()
|
- |
|
should have the alias getDist()
|
- |
|
getMagnitudeSquared()
|
- |
4 |
should be available
|
- |
|
should the return correct value 2D vector
|
- |
|
should the return correct value 3D vector
|
- |
|
should the return correct value 4D vector
|
- |
|
getMagnitude()
|
- |
5 |
should be available
|
- |
|
should return the correct value 1D vector
|
- |
|
should return the correct value 2D vector
|
- |
|
should return the correct value 3D vector
|
- |
|
should the return correct value 4D vector
|
- |
|
getX()
|
- |
5 |
should be available
|
- |
|
should return the correct value
|
- |
|
should also set 0 as a value
|
- |
|
should set the x coordinate to undefined when not provided
|
- |
|
should set the x coordinate when multiple coordinates are given
|
- |
|
getY()
|
- |
5 |
should be available
|
- |
|
should return the correct value
|
- |
|
should also set 0 as a value
|
- |
|
should set the y coordinate to undefined when not provided
|
- |
|
should set the y coordinate when multiple coordinates are given
|
- |
|
getZ()
|
- |
5 |
should be available
|
- |
|
should return the correct value
|
- |
|
should also set 0 as a value
|
- |
|
should set the z coordinate to undefined when not provided
|
- |
|
should set the z coordinate when multiple coordinates are given
|
- |
|
limit()
|
- |
1 |
should be available
|
- |
|
MagikVector
|
- |
6 |
should be available
|
- |
|
should have have a length property of
|
- |
|
should have a length value equal to the number of parameters
|
- |
4 |
should have a length property of 1
|
- |
|
should have a length property of 2
|
- |
|
should have a length property of 3
|
- |
|
should be possible to instantiate the class using an array
|
- |
|
multiply()
|
- |
6 |
should be available
|
- |
|
should have the alias mult()
|
- |
|
should return the correct value when multiplying a 2D Vector with a scaler
|
- |
|
should return the correct value when multiplying a 3D Vector with a scaler
|
- |
|
should return the correct value when multiplying two 2D Vectors
|
- |
|
should throw an error when two Vectors with different length are multiplied
|
- |
|
normalise()
|
- |
3 |
should be available
|
- |
|
should have the alias normalize()
|
- |
|
should return the correct value
|
- |
|
MagikVector.randomInteger()
|
- |
3 |
should be available
|
- |
|
should have the alias MagikVector.randomInt()
|
- |
|
should return the correct value when supplying the same minimum and maximum values
|
- |
|
random()
|
- |
8 |
should be available as static method
|
- |
|
should have the alias rand()
|
- |
|
should return a MagikVector instance
|
- |
|
should return a MagikVector instance when alias is called
|
- |
|
should be a 3D vector by default
|
- |
|
should be a 1D vector when supplying 1 as a parameter
|
- |
|
should be a 2D vector when supplying 2 as a parameter
|
- |
|
should be a multi dimensional vector when supplying a number as a parameter
|
- |
|
setCoordinate()
|
- |
4 |
should be available
|
- |
|
should have the alias setCoord()
|
- |
|
should set the correct value
|
- |
|
should set the correct value on an empty Vector
|
- |
|
setMagnitude()
|
- |
2 |
should be available
|
- |
|
should have the alias setMag()
|
- |
|
setX()
|
- |
3 |
should be available
|
- |
|
should set the correct value
|
- |
|
should set the correct value on an empty Vector
|
- |
|
setY()
|
- |
3 |
should be available
|
- |
|
should set the correct value
|
- |
|
should set the correct value on an empty Vector
|
- |
|
setZ()
|
- |
3 |
should be available
|
- |
|
should set the correct value
|
- |
|
should set the correct value on an empty Vector
|
- |
|
subtract()
|
- |
4 |
should be available
|
- |
|
should have the alias sub()
|
- |
|
should have the alias subtract()
|
- |
|
should throw an Error when the vectors have a different number of coordinates
|
- |
|
toDegrees()
|
- |
1 |
should be available as static method
|
- |
|
toRadians()
|
- |
1 |
should be available as static method
|
- |
|
toString()
|
- |
5 |
should be available
|
* |
|
should return a string
|
* |
|
should return a formatted string
|
* |
|
should return a formatted string for a 3D vector
|
* |
|
should return a formatted string for a 3D vector containing values with zeros
|
* |
|