コード例 #1
0
 public static Decimal Lerp(
     this Decimal t,
     Decimal from,
     Decimal to
     )
 {
     return(t.Clamp(0, 1) * (to - from) + from);
 }
コード例 #2
0
 public static Decimal Saturate(this Decimal v)
 {
     return(v.Clamp(0, 1));
 }