/// <summary> /// Returns the smallest value which is larger than <paramref name="value"/>. /// Does not handle NaN or Infinity. /// </summary> /// <returns>The smallest value which is larger than <paramref name="value"/>.</returns> internal static float Incremented(float value) { var temp = new Float32(value); // Incrementing the integer representation gives the next float. temp._valueI++; return(temp._valueF); }
/// <summary> /// Returns the largest value which is less than <paramref name="value"/>. /// Does not handle NaN or Infinity. /// </summary> /// <returns>The largest value which is less than <paramref name="value"/>.</returns> internal static float Decremented(float value) { var temp = new Float32(value); // Decrementing the integer representation gives the previous float. temp._valueI--; return(temp._valueF); }