s&
newspaper
About
info
About s&box
newspaper
Latest News
published_with_changes
Changes
map
Roadmap
monitoring
Metrics
games
Games
sports_esports
Browse Games
rocket
Discover Games
business_center
Workshop
sports_esports
Games
landscape
Maps
chair
Models
texture
Materials
apparel
Clothing
construction
More..
forum
Forum
docs
Docs
docs
Documentation
dashboard
Api Reference
school
Tutorials
input
Log in with Steam
chevron_left
Change Language
简体中文
English
Русский
Español
Português-Brasil
Deutsch
日本語
Français
Polski
Türkçe
한국어
Pirate
Italiano
ไทย
繁體中文
Українська
Čeština
Nederlands
Magyar
Dansk
Suomi
Svenska
Norsk
Ελληνικά
Română
Български
Tiếng Việt
Bahasa Indonesia
Español-Latinoamérica
العربية
Api
Classes
Vector3Int
chevron_left
Classes
struct
Vector3Int
search
Constructors
functions
Vector3Int
Fields
crop_din
x
crop_din
y
crop_din
z
Properties
data_object
EulerAngles
data_object
Inverse
data_object
IsZeroLength
data_object
Item
data_object
Length
data_object
LengthSquared
data_object
Normal
Methods
functions
Abs
functions
ComponentMax
functions
ComponentMin
functions
Distance
functions
IsNearlyZero
functions
Read
functions
SnapToGrid
functions
WithX
functions
WithY
functions
WithZ
functions
Write
Static Fields
crop_din
Backward
crop_din
Down
crop_din
Forward
crop_din
Left
crop_din
One
crop_din
OneX
crop_din
OneY
crop_din
OneZ
crop_din
Right
crop_din
Up
crop_din
Zero
Static Methods
functions
Cross
functions
Dot
functions
GetAngle
functions
Max
functions
Min
functions
Parse
functions
TryParse
Vector3Int
struct
sealed
Sandbox.System
build
Constructors
1
Vector3Int
(
x
,
y
,
z
)
Initializes an integer vector with given components.
crop_din
Fields
3
x
int
The X component of this integer vector.
y
int
The Y component of this integer vector.
z
int
The Z component of this integer vector.
data_object
Properties
7
EulerAngles
Angles
The Euler angles of this direction vector.
Inverse
Vector3
Returns the inverse of this vector, which is useful for scaling vectors. Keep in mind this returns a Vector3 and not a Vector3Int.
IsZeroLength
bool
Whether the length of this vector is zero or not.
Item
int
Length
float
Length (or magnitude) of the integer vector (Distance from 0,0,0)
LengthSquared
int
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.
Normal
Vector3
Returns a unit version of this vector. Keep in mind this returns a Vector3 and not a Vector3Int.
functions
Methods
11
Abs
(
)
Vector3Int
Returns a new integer vector with all values positive. -5 becomes 5, ect.
ComponentMax
(
other
)
Vector3Int
Returns an integer vector that has the maximum values on each axis between this vector and a given vector.
ComponentMin
(
other
)
Vector3Int
Returns an integer vector that has the minimum values on each axis between this vector and a given vector.
Distance
(
other
)
float
Returns distance between this vector and another.
IsNearlyZero
(
tolerance
)
bool
Returns true if value on every axis is less than or equal to tolerance.
Read
(
reader
)
Vector3Int
SnapToGrid
(
gridSize
,
sx
,
sy
,
sz
)
Vector3Int
Snap to grid along any of the 3 axes.
WithX
(
x
)
Vector3Int
Returns this integer vector with given X component.
WithY
(
y
)
Vector3Int
Returns this integer vector with given Y component.
WithZ
(
z
)
Vector3Int
Returns this integer vector with given Z component.
Write
(
writer
)
crop_din
Static Fields
11
Backward
Vector3Int
An integer vector with X set to -1. This represents the backward direction.
Down
Vector3Int
An integer vector with Z set to -1. This represents the down direction.
Forward
Vector3Int
An integer vector with X set to 1. This represents the forward direction.
Left
Vector3Int
An integer vector with Y set to -1. This represents the left direction.
One
Vector3Int
An integer vector with all components set to 1.
OneX
Vector3Int
An integer vector with X set to 1.
OneY
Vector3Int
An integer vector with Y set to 1.
OneZ
Vector3Int
An integer vector with Z set to 1.
Right
Vector3Int
An integer vector with Y set to 1. This represents the right direction.
Up
Vector3Int
An integer vector with Z set to 1. This represents the up direction.
Zero
Vector3Int
An integer vector with all components set to 0.
functions
Static Methods
7
Cross
(
a
,
b
)
Vector3Int
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.
Dot
(
a
,
b
)
float
Returns the scalar/dot product of the 2 given integer vectors.
GetAngle
(
v1
,
v2
)
float
Max
(
a
,
b
)
Vector3Int
Returns an integer vector that has the maximum values on each axis between 2 given vectors.
Min
(
a
,
b
)
Vector3Int
Returns an integer vector that has the minimum values on each axis between 2 given vectors.
Parse
(
str
)
Vector3Int
Given a string, try to convert this into a Vector3Int. Example formatting is "x,y,z", "[x,y,z]", "x y z", etc.
TryParse
(
str
,
info
,
result
)
bool
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.