| Modifier and Type | Field and Description |
|---|---|
| public float | x
The x coordinate. |
| public float | y
The y coordinate. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static float | Returns: the distance between the two sets of specified coordinates.the X coordinate of the first specified point x1, float the Y coordinate of the first specified point y1, float the X coordinate of the second specified point x2, float the Y coordinate of the second specified point y2)Returns the distance between two points. |
| public float | Returns: the distance between thisVec2f
and a specified point.the X coordinate of the specified point to be measured
against this vx, float Vec2fthe Y coordinate of the specified point to be measured
against this vy)Vec2fReturns the distance from this |
| public float | |
| public static float | Returns: the square of the distance between the two sets of specified coordinates.the X coordinate of the first specified point x1, float the Y coordinate of the first specified point y1, float the X coordinate of the second specified point x2, float the Y coordinate of the second specified point y2)Returns the square of the distance between two points. |
| public float | Returns: the square of the distance between thisVec2f and the specified point.the X coordinate of the specified point to be measured
against this vx, float Vec2fthe Y coordinate of the specified point to be measured
against this vy)Vec2fReturns the square of the distance from this
|
| public float | Returns: the square of the distance between thisVec2f to a specified Vec2f.the specified point to be measured
against this v)Vec2fReturns the square of the distance from this
|
| public boolean | Returns: true if the object to be compared is
an instance of Vec2f and has
the same values; false otherwise.an object to be compared with this obj)Vec2fOverrides java. Determines whether or not two 2D points or vectors are equal. |
| public int | Returns: a hash code for thisVec2f.Overrides java. Returns the hashcode for this |
| public void | |
| public void | set(float
the new X coordinate of this x, float Vec2fthe new Y coordinate of this y)Vec2fSets the location of this |
| public String | Returns: a string representation of thisVec2f.Overrides java. Returns a |
| x | back to summary |
|---|---|
| public float x The x coordinate. | |
| y | back to summary |
|---|---|
| public float y The y coordinate. | |
| Vec2f | back to summary |
|---|---|
| public Vec2f() | |
| Vec2f | back to summary |
|---|---|
| public Vec2f(float x, float y) | |
| Vec2f | back to summary |
|---|---|
| public Vec2f(Vec2f v) | |
| distance | back to summary |
|---|---|
| public static float distance(float x1, float y1, float x2, float y2) Returns the distance between two points.
| |
| distance | back to summary |
|---|---|
| public float distance(float vx, float vy) Returns the distance from this
| |
| distance | back to summary |
|---|---|
| public float distance(Vec2f v) Returns the distance from this
| |
| distanceSq | back to summary |
|---|---|
| public static float distanceSq(float x1, float y1, float x2, float y2) Returns the square of the distance between two points.
| |
| distanceSq | back to summary |
|---|---|
| public float distanceSq(float vx, float vy) Returns the square of the distance from this
| |
| distanceSq | back to summary |
|---|---|
| public float distanceSq(Vec2f v) Returns the square of the distance from this
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Determines whether or not two 2D points or vectors are equal.
Two instances of | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Returns the hashcode for this
| |
| set | back to summary |
|---|---|
| public void set(Vec2f v) Sets the location of this
| |
| set | back to summary |
|---|---|
| public void set(float x, float y) Sets the location of this
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a | |