Megadocs 0.0.1
All of megapop's internal libraries
Megapop.MegaCore.FloatExt Class Reference

Static Public Member Functions

static float MoveTowards (this float current, float target, float maxDelta)
 
static float Sign (this float f)
 
static float Abs (this float f)
 
static float Clamp (this float value, float min, float max)
 
static float Clamp01 (this float value)
 
static bool Approximately (this float a, float b)
 TODO: Look into the implementation. We should have two versions - fast and precise https://github.com/apple/swift-evolution/blob/master/proposals/0259-approximately-equal.md More...
 
static float Remap (this float value, float fromMin, float fromMax, float toMin, float toMax)
 
static float Remap01 (this float value, float fromMin, float fromMax)
 

Member Function Documentation

◆ Abs()

static float Megapop.MegaCore.FloatExt.Abs ( this float  f)
inlinestatic

◆ Approximately()

static bool Megapop.MegaCore.FloatExt.Approximately ( this float  a,
float  b 
)
inlinestatic

TODO: Look into the implementation. We should have two versions - fast and precise https://github.com/apple/swift-evolution/blob/master/proposals/0259-approximately-equal.md

◆ Clamp()

static float Megapop.MegaCore.FloatExt.Clamp ( this float  value,
float  min,
float  max 
)
inlinestatic

◆ Clamp01()

static float Megapop.MegaCore.FloatExt.Clamp01 ( this float  value)
inlinestatic

◆ MoveTowards()

static float Megapop.MegaCore.FloatExt.MoveTowards ( this float  current,
float  target,
float  maxDelta 
)
inlinestatic

◆ Remap()

static float Megapop.MegaCore.FloatExt.Remap ( this float  value,
float  fromMin,
float  fromMax,
float  toMin,
float  toMax 
)
inlinestatic

◆ Remap01()

static float Megapop.MegaCore.FloatExt.Remap01 ( this float  value,
float  fromMin,
float  fromMax 
)
inlinestatic

◆ Sign()

static float Megapop.MegaCore.FloatExt.Sign ( this float  f)
inlinestatic

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