org.jsfml.system

## Class Vector3i

• All Implemented Interfaces:
Serializable

```public final class Vector3i
extends Object
implements Serializable```
Represents three-dimensional vectors using integer coordinates and provides arithmetic operations on integral 3D vectors.
See Also:
Serialized Form
• ### Field Summary

Fields
Modifier and Type Field and Description
`int` `x`
The vector's X coordinate.
`int` `y`
The vector's Y coordinate.
`int` `z`
The vector's Z coordinate.
`static Vector3i` `ZERO`
The zero vector.
• ### Constructor Summary

Constructors
Constructor and Description
```Vector3i(int x, int y, int z)```
Constructs a new vector with the given coordinates.
`Vector3i(Vector3f v)`
Constructs a new vector by converting a floating point vector.
• ### Method Summary

Methods
Modifier and Type Method and Description
`static Vector3i` ```add(Vector3i a, Vector3i b)```
Adds two vectors.
`static Vector3i` ```componentwiseDiv(Vector3i a, Vector3i b)```
Performs a component-wise division of two vectors.
`static Vector3i` ```componentwiseMul(Vector3i a, Vector3i b)```
Performs a component-wise multiplication of two vectors.
`static Vector3i` ```div(Vector3i a, int s)```
Performs an integer division on each component of the vector by a scalar.
`boolean` `equals(Object o)`
`int` `hashCode()`
`static Vector3i` ```mul(Vector3i a, int s)```
Multiplies a vector by a scalar.
`static Vector3i` `neg(Vector3i v)`
Computes the negation of a vector.
`static Vector3i` ```sub(Vector3i a, Vector3i b)```
Subtracts two vectors.
`String` `toString()`
• ### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`
• ### Field Detail

• #### ZERO

`public static final Vector3i ZERO`
The zero vector.
• #### x

`public final int x`
The vector's X coordinate.
• #### y

`public final int y`
The vector's Y coordinate.
• #### z

`public final int z`
The vector's Z coordinate.
• ### Constructor Detail

• #### Vector3i

```public Vector3i(int x,
int y,
int z)```
Constructs a new vector with the given coordinates.
Parameters:
`x` - the X coordinate.
`y` - the Y coordinate.
`z` - the Z coordinate.
• #### Vector3i

`public Vector3i(Vector3f v)`
Constructs a new vector by converting a floating point vector.

The fractions of the coordinates will be cut off.

Parameters:
`v` - the vector to convert.
• ### Method Detail

• #### add

```public static Vector3i add(Vector3i a,
Vector3i b)```
Adds two vectors.
Parameters:
`a` - the first vector.
`b` - the second vector.
Returns:
a new vector, representing the sum of the two vectors.
• #### sub

```public static Vector3i sub(Vector3i a,
Vector3i b)```
Subtracts two vectors.
Parameters:
`a` - the first vector.
`b` - the second vector.
Returns:
a new vector, representing the difference between the two vectors.
• #### componentwiseMul

```public static Vector3i componentwiseMul(Vector3i a,
Vector3i b)```
Performs a component-wise multiplication of two vectors.
Parameters:
`a` - the first vector.
`b` - the second vector.
Returns:
a new vector, representing the "product" of the two vectors.
• #### componentwiseDiv

```public static Vector3i componentwiseDiv(Vector3i a,
Vector3i b)```
Performs a component-wise division of two vectors.
Parameters:
`a` - the first vector.
`b` - the second vector.
Returns:
a new vector, representing the "quotient" of the two vectors.
• #### mul

```public static Vector3i mul(Vector3i a,
int s)```
Multiplies a vector by a scalar.
Parameters:
`a` - the vector.
`s` - the scalar to multiply by.
Returns:
a new vector, representing the scaled vector.
• #### div

```public static Vector3i div(Vector3i a,
int s)```
Performs an integer division on each component of the vector by a scalar.
Parameters:
`a` - the vector.
`s` - the scalar.
Returns:
a new vector, representing the scaled vector.
• #### neg

`public static Vector3i neg(Vector3i v)`
Computes the negation of a vector.
Parameters:
`v` - the vector.
Returns:
a new vector, representing the negation of the given vector.
• #### equals

`public boolean equals(Object o)`
Overrides:
`equals` in class `Object`
• #### hashCode

`public int hashCode()`
Overrides:
`hashCode` in class `Object`
• #### toString

`public String toString()`
Overrides:
`toString` in class `Object`