Esempio n. 1
0
 /// <summary>
 /// Computes max(first, second).
 /// </summary>
 /// <param name="first">The first argument.</param>
 /// <param name="second">The second argument.</param>
 /// <returns>The maximum of first and second value.</returns>
 public static Index2 Max(Index2 first, Index2 second) =>
 new Index2(
     IntrinsicMath.Max(first.X, second.X),
     IntrinsicMath.Max(first.Y, second.Y));
Esempio n. 2
0
 /// <summary>
 /// Clamps the given index value according to Max(Min(clamp, max), min).
 /// </summary>
 /// <param name="value">The value to clamp.</param>
 /// <param name="min">The first argument.</param>
 /// <param name="max">The second argument.</param>
 /// <returns>The clamped value in the interval [min, max].</returns>
 public static Index2 Clamp(Index2 value, Index2 min, Index2 max) =>
 new Index2(
     IntrinsicMath.Clamp(value.X, min.X, max.X),
     IntrinsicMath.Clamp(value.Y, min.Y, max.Y));
Esempio n. 3
0
 /// <summary>
 /// Clamps the given index value according to Max(Min(clamp, max), min).
 /// </summary>
 /// <param name="value">The value to clamp.</param>
 /// <param name="min">The first argument.</param>
 /// <param name="max">The second argument.</param>
 /// <returns>The clamped value in the interval [min, max].</returns>
 public static Index1 Clamp(Index1 value, Index1 min, Index1 max) =>
 new Index1(IntrinsicMath.Clamp(value.X, min.X, max.X));
Esempio n. 4
0
 /// <summary>
 /// Computes max(first, second).
 /// </summary>
 /// <param name="first">The first argument.</param>
 /// <param name="second">The second argument.</param>
 /// <returns>The maximum of first and second value.</returns>
 public static Index1 Max(Index1 first, Index1 second) =>
 new Index1(IntrinsicMath.Max(first.X, second.X));
Esempio n. 5
0
 /// <summary>
 /// Clamps the given index value according to Max(Min(clamp, max), min).
 /// </summary>
 /// <param name="value">The value to clamp.</param>
 /// <param name="min">The first argument.</param>
 /// <param name="max">The second argument.</param>
 /// <returns>The clamped value in the interval [min, max].</returns>
 public static Index Clamp(Index value, Index min, Index max) =>
 new Index(IntrinsicMath.Clamp(value.X, min.X, max.X));
Esempio n. 6
0
 /// <summary>
 /// Computes max(first, second).
 /// </summary>
 /// <param name="first">The first argument.</param>
 /// <param name="second">The second argument.</param>
 /// <returns>The maximum of first and second value.</returns>
 public static Index Max(Index first, Index second) =>
 new Index(IntrinsicMath.Max(first.X, second.X));