Exemplo n.º 1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="vector"></param>
 /// <returns></returns>
 public static Color FromVector(Vector3d vector)
 {
     return(Color.FromArgb(
                SlurMath.Clamp((int)vector.X, 255),
                SlurMath.Clamp((int)vector.Y, 255),
                SlurMath.Clamp((int)vector.Z, 255)));
 }
Exemplo n.º 2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="t"></param>
 /// <returns></returns>
 public double Clamp(double t)
 {
     if (IsDecreasing)
     {
         return(SlurMath.Clamp(t, B, A));
     }
     else
     {
         return(SlurMath.Clamp(t, A, B));
     }
 }
Exemplo n.º 3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="t"></param>
 /// <returns></returns>
 public float Clamp(float t)
 {
     if (IsDecreasing)
     {
         return(SlurMath.Clamp(t, B, A));
     }
     else
     {
         return(SlurMath.Clamp(t, A, B));
     }
 }