public sealed struct Vector3Int
Related Guides
Broader workflow and conceptual references connected to this API.
Constructors
Showing 3 constructors
No results match this filter.
Methods
Showing 23 methods
public Vector3Int Abs()
Returns a new integer vector with all values positive. -5 becomes 5, ect.
public Vector3Int ComponentMax(Vector3Int other)
Returns an integer vector that has the maximum values on each axis between this vector and a given vector.
public Vector3Int ComponentMin(Vector3Int other)
Returns an integer vector that has the minimum values on each axis between this vector and a given vector.
public static Vector3Int Cross(Vector3Int a, Vector3Int b)
Returns the cross product of this and the given integer vector. If this and the given vectors are linearly independent, the resulting vector is perpendicular to them both, also known as a normal of a plane.
public static float GetAngle(Vector3Int v1, Vector3Int v2)
public bool IsNearlyZero(int tolerance = 0)
Returns true if value on every axis is less than or equal to tolerance.
Parameters
tolerance: Default: 0
public static Vector3Int Max(Vector3Int a, Vector3Int b)
Returns an integer vector that has the maximum values on each axis between 2 given vectors.
public static Vector3Int Min(Vector3Int a, Vector3Int b)
Returns an integer vector that has the minimum values on each axis between 2 given vectors.
public Vector3Int Read(System.IO.BinaryReader reader)
public Vector3Int SnapToGrid(int gridSize, bool sx = True, bool sy = True, bool sz = True)
Snap to grid along any of the 3 axes.
Parameters
sx: Default: Truesy: Default: Truesz: Default: True
public static override bool TryParse(string str, System.IFormatProvider info, Vector3Int result)
public Vector3Int WithX(int x)
Returns this integer vector with given X component.
public Vector3Int WithY(int y)
Returns this integer vector with given Y component.
public Vector3Int WithZ(int z)
Returns this integer vector with given Z component.
public void Write(System.IO.BinaryWriter writer)
No results match this filter.
Properties
Showing 7 properties
public Angles Vector3Int.EulerAngles { get; set; }
The Euler angles of this direction vector.
public Vector3 Vector3Int.Inverse { get; set; }
Returns the inverse of this vector, which is useful for scaling vectors. Keep in mind this returns a Vector3 and not a Vector3Int.
public bool Vector3Int.IsZeroLength { get; set; }
Whether the length of this vector is zero or not.
public int Vector3Int.Item { get; set; }
public float Vector3Int.Length { get; set; }
Length (or magnitude) of the integer vector (Distance from 0,0,0)
public int Vector3Int.LengthSquared { get; set; }
Squared length of the integer vector. This is faster than Length, and can be used for things like comparing distances, as long as only squared values are used.
public Vector3 Vector3Int.Normal { get; set; }
Returns a unit version of this vector. Keep in mind this returns a Vector3 and not a Vector3Int.
No results match this filter.
Metadata
| Field | Value |
|---|---|
| Namespace | global |
| Type | class |
| Assembly | Sandbox.System |
| Doc ID | T:Vector3Int |