Mirror Networking
Mirror.Mathd Class Reference

Static Public Member Functions

static double LerpUnclamped (double a, double b, double t)
 Linearly interpolates between a and b by t with no limit to t.
 
static double Clamp01 (double value)
 Clamps value between 0 and 1 and returns value. More...
 
static double InverseLerp (double a, double b, double value)
 Calculates the linear parameter t that produces the interpolant value within the range [a, b].
 

Detailed Description

Definition at line 7 of file Mathd.cs.

Member Function Documentation

◆ Clamp01()

static double Mirror.Mathd.Clamp01 ( double  value)
static

Clamps value between 0 and 1 and returns value.

Definition at line 16 of file Mathd.cs.

17 {
18 if (value < 0.0)
19 return 0;
20 return value > 1 ? 1 : value;
21 }