/** * @brief Returns a {@link FP} between a min value [inclusive] and a max value [inclusive]. **/ public FP Next(float minValue, float maxValue) { int minValueInt = (int)(minValue * 1000), maxValueInt = (int)(maxValue * 1000); if (minValueInt > maxValueInt) { int tmp = maxValueInt; maxValueInt = minValueInt; minValueInt = tmp; } return((FP.Floor((maxValueInt - minValueInt + 1) * NextFP() + minValueInt)) / 1000); }
/// <summary> /// Returns the largest integer less than or equal to the specified number. /// </summary> public static FP Floor(FP value) { return(FP.Floor(value)); }