CGSGPosition Class
A Position object
Item Index
Methods
Methods
add
(
public
-
vector
add to this vector, the value passed in parameter
Parameters:
-
vectorCGSGVector2D
divide
(
public
-
vector
divide to this vector, the value passed in parameter
Parameters:
-
vectorCGSGVector2D
getDistance
(
Number
public
-
vector
Compute the euclidian distance between this vector and the one passe in parameter
Parameters:
-
vectorCGSGVector2D
Returns:
multiply
(
public
-
vector
multiply to this vector, the value passed in parameter
Parameters:
-
vectorCGSGVector2D
normalize
()
public
Normalize this vector
substract
(
public
-
vector
substract to this vector, the value passed in parameter
Parameters:
-
vectorCGSGVector2D
translateBy
(
public
-
x -
y
Add new coordinate to the current relative one
translateTo
(
-
newX -
newY
Replace current relative position by this new one