Atlantis.Vector2 Class
Create a new Vector2
Constructor
Atlantis.Vector2
()
Item Index
Methods
add
-
value
Add this vector by another vector or value.
Parameters:
-
value
Atlantis.Vector2A vector or a value to add to this vector.
add
-
A
-
Another
Add two vectors.
Parameters:
-
A
Atlantis.Vector2vector.
-
Another
Atlantis.Vector2vector.
distance
-
A
-
Another
Gets the distance between two vectors.
Parameters:
-
A
Atlantis.Vector2vector.
-
Another
Atlantis.Vector2vector.
divide
-
value
Divide this vector by another vector
Parameters:
-
value
Atlantis.Vector2A vector or a value to divide to this vector.
divide
-
A
-
Another
Divide two vectors.
Parameters:
-
A
Atlantis.Vector2vector.
-
Another
Atlantis.Vector2vector.
dot
-
First
-
Second
Calculate the dot product of two vectors.
Parameters:
-
First
Atlantis.Vector2vector to use.
-
Second
Atlantis.Vector2vector to use.
Returns:
Return the dot product of the two vectors.
getDistance
-
vector2
Gets distance between this vector and the vector passed in parameter.
Parameters:
-
vector2
Atlantis.Vector2The vector2 to use to determine the distance.
Returns:
The distance between this vector and the vector passed in parameter.
getDistance
-
vector2
Gets distance between this vector and the vector passed in parameter.
Parameters:
-
vector2
Atlantis.Vector2The vector2 to use to determine the distance.
Returns:
The distance between this vector and the vector passed in parameter.
lerp
-
First
-
Second
-
amount
Performs a linear interpolation between to vectors.
Parameters:
-
First
Atlantis.Vector2vector to use.
-
Second
Atlantis.Vector2vector to use.
-
amount
Object
Returns:
max
-
vec1
-
vec2
Gets a vector of the maximum of the two vectors.
Returns:
Return a vector that correspond of the maximum of the two vectors.
min
-
vec1
-
vec2
Gets a vector of the minimum of the two vectors.
Returns:
Return a vector that correspond of the minimum of the two vectors.
multiply
-
value
Multiply this vector by another vector or a value.
Parameters:
-
value
Atlantis.Vector2A vector or a value to multiply to this vector.
multiply
-
A
-
Another
Multiply two vectors.
Parameters:
-
A
Atlantis.Vector2vector.
-
Another
Atlantis.Vector2vector.
negate
()
Negate this vector
negate
-
A
Negate a vector.
Parameters:
-
A
Atlantis.Vector2vector to use.
Returns:
Return the negated vector.
normalize
()
Normalize this vector.
One
()
Gets a Vector3 with all coordinates sets to one.
subtract
-
A
-
Another
Subtract two vectors.
Parameters:
-
A
Atlantis.Vector2vector.
-
Another
Atlantis.Vector2vector.
subtract
-
value
Substract this vector by another vector or value.
Parameters:
-
value
Atlantis.Vector2A vector or a value to subtract to this vector.
transform
-
position
-
matrix
Gets a transformed Vector3 from a position and a matrix.
Parameters:
-
position
Atlantis.Vector3 -
matrix
Atlantis.Matrix
Returns:
A tranformed vector.
transformCoordinate
-
position
-
matrix
Gets a transformed Vector3 from a position and a matrix.
Parameters:
-
position
Atlantis.Vector3 -
matrix
Atlantis.Matrix
Returns:
A tranformed vector.
UnitX
()
Gets a Vector3 with X coordinate set to one.
UnitY
()
Gets a Vector3 with Y coordinate set to one.
Zero
()
Gets a Vector3 with all coordinates sets to zero.