DOTS Geometry
 
Loading...
Searching...
No Matches
Float3Extension Class Reference

Static Public Member Functions

static bool ApproximatelyEquals (this float3 vec, float3 other, float epsilon=10e-5f)
 
static bool ContainsInfinities (this float3 vec)
 
static bool ContaintsNaNs (this float3 vec)
 
static float SelectComponent (this float3 vec, int component)
 
static float2 SelectComponents (this float3 vec, int component0, int component1)
 

Static Public Attributes

static readonly float3 Back = new float3(0.0f, 0.0f, -1.0f)
 
static readonly float3 Down = new float3(0.0f, -1.0f, 0.0f)
 
static readonly float3 Forward = new float3(0.0f, 0.0f, 1.0f)
 
static readonly float3 Left = new float3(-1.0f, 0.0f, 0.0f)
 
static readonly float3 Right = new float3(1.0f, 0.0f, 0.0f)
 
static readonly float3 Up = new float3(0.0f, 1.0f, 0.0f)
 

Member Function Documentation

◆ ApproximatelyEquals()

static bool ApproximatelyEquals ( this float3 vec,
float3 other,
float epsilon = 10e-5f )
static
Parameters
vec
other
epsilon
Returns
True if the values of the coordinates are all within epsilon or less from each other

◆ ContainsInfinities()

static bool ContainsInfinities ( this float3 vec)
static
Parameters
vec
Returns
True if the vector contains Infinities

◆ ContaintsNaNs()

static bool ContaintsNaNs ( this float3 vec)
static
Parameters
vec
Returns
True if the vector contains NaNs

◆ SelectComponent()

static float SelectComponent ( this float3 vec,
int component )
static
Parameters
vec
component
Returns
Returns the n-th coordinate of the vector, where n = component

◆ SelectComponents()

static float2 SelectComponents ( this float3 vec,
int component0,
int component1 )
static
Parameters
vec
component0
component1
Returns
Returns the two coordinates from the vector, selected by the two parameters