Compare commits
2 Commits
ILGpu
...
f1d1749c40
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f1d1749c40 | ||
|
|
07c00117f1 |
@@ -45,7 +45,7 @@ public static class Program {
|
||||
Images.Add(new(pixels, pixels.GetLength(0), pixels.GetLength(1)));
|
||||
pixels = ImageUtil.LoadImage<Vector3>($"./spherefull.png");
|
||||
Images.Add(new(pixels, pixels.GetLength(0), pixels.GetLength(1)));
|
||||
*/
|
||||
*/
|
||||
|
||||
//check if all the images in Images are the same resolution
|
||||
if (Images.Select(img => (img.Width, img.Height)).Distinct().Count() > 1) {
|
||||
@@ -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