JUtils
A unity utilities library
JUtils.Vector3Extensions Class Reference

Static Public Member Functions

static Vector3 With (this Vector3 self, float? x=null, float? y=null, float? z=null)
 Set a specific value of the vector More...
 
static Vector3 Add (this Vector3 self, float? x=null, float? y=null, float? z=null)
 add to a specific value of the vector More...
 
static Vector3 ClampMagnitude (this Vector3 self, float maxForce)
 Set a specific value of the vector More...
 
static Vector3 Closest (this Vector3 self, Vector3 a, Vector3 b)
 Get the closest vector from self More...
 
static Vector2 XZToVector2 (this Vector3 self)
 Round the Vector3 More...
 
static Vector3 Round (this Vector3 self)
 Round the Vector3 More...
 
static Vector3 Floor (this Vector3 self)
 Floor the Vector3 More...
 
static Vector3 Divide (this Vector3 self, Vector3 other)
 Divide the Vector3 by a scalar More...
 
static Vector3 Multiply (this Vector3 self, Vector3 other)
 Multiply the Vector3 by a scalar More...
 
static Vector3 Positive (this Vector3 self)
 Return the vector with absolute values More...
 
static Vector3 Negative (this Vector3 self)
 Return the vector with negative values More...
 

Member Function Documentation

◆ Add()

static Vector3 JUtils.Vector3Extensions.Add ( this Vector3  self,
float?  x = null,
float?  y = null,
float?  z = null 
)
inlinestatic

add to a specific value of the vector

◆ ClampMagnitude()

static Vector3 JUtils.Vector3Extensions.ClampMagnitude ( this Vector3  self,
float  maxForce 
)
inlinestatic

Set a specific value of the vector

◆ Closest()

static Vector3 JUtils.Vector3Extensions.Closest ( this Vector3  self,
Vector3  a,
Vector3  b 
)
inlinestatic

Get the closest vector from self

Parameters
aThe first target to check

"> <param name="b">The second target to check

Returns
The closest vector

◆ Divide()

static Vector3 JUtils.Vector3Extensions.Divide ( this Vector3  self,
Vector3  other 
)
inlinestatic

Divide the Vector3 by a scalar

◆ Floor()

static Vector3 JUtils.Vector3Extensions.Floor ( this Vector3  self)
inlinestatic

Floor the Vector3

Returns
The rounded position

◆ Multiply()

static Vector3 JUtils.Vector3Extensions.Multiply ( this Vector3  self,
Vector3  other 
)
inlinestatic

Multiply the Vector3 by a scalar

◆ Negative()

static Vector3 JUtils.Vector3Extensions.Negative ( this Vector3  self)
inlinestatic

Return the vector with negative values

Returns
The negative position

◆ Positive()

static Vector3 JUtils.Vector3Extensions.Positive ( this Vector3  self)
inlinestatic

Return the vector with absolute values

Returns
The absolute position

◆ Round()

static Vector3 JUtils.Vector3Extensions.Round ( this Vector3  self)
inlinestatic

Round the Vector3

Returns
The rounded position

◆ With()

static Vector3 JUtils.Vector3Extensions.With ( this Vector3  self,
float?  x = null,
float?  y = null,
float?  z = null 
)
inlinestatic

Set a specific value of the vector

◆ XZToVector2()

static Vector2 JUtils.Vector3Extensions.XZToVector2 ( this Vector3  self)
inlinestatic

Round the Vector3

Returns
The rounded position

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