PocketMine-MP 5.23.3 git-fbaa125d0ce21ffef98fc1630881a92bedfbaa73
Loading...
Searching...
No Matches
pocketmine\math\Vector2 Class Reference
+ Collaboration diagram for pocketmine\math\Vector2:

Public Member Functions

 __construct (public float $x, public float $y)
 
 __toString ()
 
 abs ()
 
 add (float $x, float $y)
 
 addVector (Vector2 $vector2)
 
 ceil ()
 
 distance (Vector2 $pos)
 
 distanceSquared (Vector2 $pos)
 
 divide (float $number)
 
 dot (Vector2 $v)
 
 floor ()
 
 getFloorX ()
 
 getFloorY ()
 
 getX ()
 
 getY ()
 
 length ()
 
 lengthSquared ()
 
 multiply (float $number)
 
 normalize ()
 
 round ()
 
 subtract (float $x, float $y)
 
 subtractVector (Vector2 $vector2)
 

Detailed Description

Definition at line 32 of file Vector2.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\math\Vector2::__construct ( public float $x,
public float $y )

Definition at line 33 of file Vector2.php.

Member Function Documentation

◆ __toString()

pocketmine\math\Vector2::__toString ( )

Definition at line 123 of file Vector2.php.

◆ abs()

pocketmine\math\Vector2::abs ( )

Definition at line 82 of file Vector2.php.

◆ add()

pocketmine\math\Vector2::add ( float $x,
float $y )

Definition at line 54 of file Vector2.php.

◆ addVector()

pocketmine\math\Vector2::addVector ( Vector2 $vector2)

Definition at line 58 of file Vector2.php.

◆ ceil()

pocketmine\math\Vector2::ceil ( )

Definition at line 70 of file Vector2.php.

◆ distance()

pocketmine\math\Vector2::distance ( Vector2 $pos)

Definition at line 94 of file Vector2.php.

◆ distanceSquared()

pocketmine\math\Vector2::distanceSquared ( Vector2 $pos)

Definition at line 98 of file Vector2.php.

◆ divide()

pocketmine\math\Vector2::divide ( float $number)

Definition at line 90 of file Vector2.php.

◆ dot()

pocketmine\math\Vector2::dot ( Vector2 $v)

Definition at line 119 of file Vector2.php.

◆ floor()

pocketmine\math\Vector2::floor ( )

Definition at line 74 of file Vector2.php.

◆ getFloorX()

pocketmine\math\Vector2::getFloorX ( )

Definition at line 46 of file Vector2.php.

◆ getFloorY()

pocketmine\math\Vector2::getFloorY ( )

Definition at line 50 of file Vector2.php.

◆ getX()

pocketmine\math\Vector2::getX ( )

Definition at line 38 of file Vector2.php.

◆ getY()

pocketmine\math\Vector2::getY ( )

Definition at line 42 of file Vector2.php.

◆ length()

pocketmine\math\Vector2::length ( )

Definition at line 102 of file Vector2.php.

◆ lengthSquared()

pocketmine\math\Vector2::lengthSquared ( )

Definition at line 106 of file Vector2.php.

◆ multiply()

pocketmine\math\Vector2::multiply ( float $number)

Definition at line 86 of file Vector2.php.

◆ normalize()

pocketmine\math\Vector2::normalize ( )

Definition at line 110 of file Vector2.php.

◆ round()

pocketmine\math\Vector2::round ( )

Definition at line 78 of file Vector2.php.

◆ subtract()

pocketmine\math\Vector2::subtract ( float $x,
float $y )

Definition at line 62 of file Vector2.php.

◆ subtractVector()

pocketmine\math\Vector2::subtractVector ( Vector2 $vector2)

Definition at line 66 of file Vector2.php.


The documentation for this class was generated from the following file: