Vector2
in package
Table of Contents
- $x : float
- $y : float
- __construct() : mixed
- __toString() : mixed
- abs() : Vector2
- add() : Vector2
- addVector() : Vector2
- ceil() : Vector2
- distance() : float
- distanceSquared() : float
- divide() : Vector2
- dot() : float
- floor() : Vector2
- getFloorX() : int
- getFloorY() : int
- getX() : float
- getY() : float
- length() : float
- lengthSquared() : float
- multiply() : Vector2
- normalize() : Vector2
- round() : Vector2
- subtract() : Vector2
- subtractVector() : Vector2
Properties
$x
public
float
$x
$y
public
float
$y
Methods
__construct()
public
__construct(float $x, float $y) : mixed
Parameters
- $x : float
- $y : float
Return values
mixed —__toString()
public
__toString() : mixed
Return values
mixed —abs()
public
abs() : Vector2
Return values
Vector2 —add()
public
add(float $x, float $y) : Vector2
Parameters
- $x : float
- $y : float
Return values
Vector2 —addVector()
public
addVector(Vector2 $vector2) : Vector2
Parameters
- $vector2 : Vector2
Return values
Vector2 —ceil()
public
ceil() : Vector2
Return values
Vector2 —distance()
public
distance(Vector2 $pos) : float
Parameters
- $pos : Vector2
Return values
float —distanceSquared()
public
distanceSquared(Vector2 $pos) : float
Parameters
- $pos : Vector2
Return values
float —divide()
public
divide(float $number) : Vector2
Parameters
- $number : float
Return values
Vector2 —dot()
public
dot(Vector2 $v) : float
Parameters
- $v : Vector2
Return values
float —floor()
public
floor() : Vector2
Return values
Vector2 —getFloorX()
public
getFloorX() : int
Return values
int —getFloorY()
public
getFloorY() : int
Return values
int —getX()
public
getX() : float
Return values
float —getY()
public
getY() : float
Return values
float —length()
public
length() : float
Return values
float —lengthSquared()
public
lengthSquared() : float
Return values
float —multiply()
public
multiply(float $number) : Vector2
Parameters
- $number : float
Return values
Vector2 —normalize()
public
normalize() : Vector2
Return values
Vector2 —round()
public
round() : Vector2
Return values
Vector2 —subtract()
public
subtract(float $x, float $y) : Vector2
Parameters
- $x : float
- $y : float
Return values
Vector2 —subtractVector()
public
subtractVector(Vector2 $vector2) : Vector2
Parameters
- $vector2 : Vector2