Esempio n. 1
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 Index3 Clamp(Index3 value, Index3 min, Index3 max)
 {
     return(new Index3(
                GPUMath.Clamp(value.X, min.X, max.X),
                GPUMath.Clamp(value.Y, min.Y, max.Y),
                GPUMath.Clamp(value.Z, min.Z, max.Z)));
 }
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 Index Clamp(Index value, Index min, Index max)
 {
     return(new Index(GPUMath.Clamp(value.X, min.X, max.X)));
 }
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 Index2 Clamp(Index2 value, Index2 min, Index2 max)
 {
     return(new Index2(
                GPUMath.Clamp(value.X, min.X, max.X),
                GPUMath.Clamp(value.Y, min.Y, max.Y)));
 }