Curvy  3.0.0
CurvyUtility Class Reference

Detailed Description

Curvy Utility class

Static Public Member Functions

static bool Approximately (this float x, float y)
 Does the same things as Mathf.Approximately, but with different handling of case where one of the two values is 0 Considering inputs of 0 and 1E-7, Mathf.Approximately will return false, while this method will return true. More...
 
static float ClampDistance (float distance, CurvyClamping clamping, float length)
 Clamps absolute position More...
 
static float ClampDistance (float distance, CurvyClamping clamping, float length, float min, float max)
 Clamps absolute position More...
 
static float ClampDistance (float distance, ref int dir, CurvyClamping clamping, float length)
 Clamps absolute position and sets new direction More...
 
static float ClampDistance (float distance, ref int dir, CurvyClamping clamping, float length, float min, float max)
 Clamps absolute position and sets new direction More...
 
static float ClampTF (float tf, CurvyClamping clamping)
 Clamps relative position More...
 
static float ClampTF (float tf, ref int dir, CurvyClamping clamping)
 Clamps relative position and sets new direction More...
 
static float ClampTF (float tf, ref int dir, CurvyClamping clamping, float minTF, float maxTF)
 Clamps relative position and sets new direction More...
 
static float ClampValue (float tf, CurvyClamping clamping, float minTF, float maxTF)
 Clamps a float to a range More...
 
static Material GetDefaultMaterial ()
 Gets the default material, i.e. /Packages/Curvy/Resources/CurvyDefaultMaterial More...
 

Member Function Documentation

static bool Approximately ( this float  x,
float  y 
)
static

Does the same things as Mathf.Approximately, but with different handling of case where one of the two values is 0 Considering inputs of 0 and 1E-7, Mathf.Approximately will return false, while this method will return true.

static float ClampDistance ( float  distance,
CurvyClamping  clamping,
float  length 
)
static

Clamps absolute position

static float ClampDistance ( float  distance,
CurvyClamping  clamping,
float  length,
float  min,
float  max 
)
static

Clamps absolute position

static float ClampDistance ( float  distance,
ref int  dir,
CurvyClamping  clamping,
float  length 
)
static

Clamps absolute position and sets new direction

static float ClampDistance ( float  distance,
ref int  dir,
CurvyClamping  clamping,
float  length,
float  min,
float  max 
)
static

Clamps absolute position and sets new direction

static float ClampTF ( float  tf,
CurvyClamping  clamping 
)
static

Clamps relative position

static float ClampTF ( float  tf,
ref int  dir,
CurvyClamping  clamping 
)
static

Clamps relative position and sets new direction

static float ClampTF ( float  tf,
ref int  dir,
CurvyClamping  clamping,
float  minTF,
float  maxTF 
)
static

Clamps relative position and sets new direction

static float ClampValue ( float  tf,
CurvyClamping  clamping,
float  minTF,
float  maxTF 
)
static

Clamps a float to a range

static Material GetDefaultMaterial ( )
static

Gets the default material, i.e. /Packages/Curvy/Resources/CurvyDefaultMaterial


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