using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Media; namespace NodeEditor.Extensions { class MathExtensions { public static int Map(int value, int min, int max) { if (value > max) return max; if (value < min) return min; return value; } public static double Map(double value, int min, int max) { if (value > max) return max; if (value < min) return min; return value; } public static bool InRange(int value, int min, int max) { return value > min && value < max; } public static bool InRange(double value, double min, double max) { return value > min && value < max; } public static TransformGroup applyMultiTransform(params Transform[] transforms) { TransformGroup temp = new TransformGroup(); foreach (Transform t in transforms) temp.Children.Add(t); return temp; } } }