Compare commits
2 Commits
ILGpu
...
f1d1749c40
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f1d1749c40 | ||
|
|
07c00117f1 |
@@ -252,6 +252,8 @@ public static class Program {
|
||||
where T : INumber<T>, IMultiplyOperators<T, float, T>, IAdditionOperators<T, T, T>
|
||||
=> a * (1 - t) + b * t;
|
||||
|
||||
static Vector3 Lerp(Vector3 a, Vector3 b, float t) => a * (1 - t) + b * t;
|
||||
|
||||
static T Remap<T>(T value, T min, T max, T newMin, T newMax)
|
||||
where T : INumber<T>, ISubtractionOperators<T, T, T>, IMultiplyOperators<T, T, T>, IAdditionOperators<T, T, T>
|
||||
=> (value - min) / (max - min) * (newMax - newMin) + newMin;
|
||||
|
||||
Reference in New Issue
Block a user