Class StiFunctionsMath

java.lang.Object
com.stimulsoft.report.dictionary.functions.StiFunctionsMath

public class StiFunctionsMath extends Object
Copyright Stimulsoft
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static double
    clamp(double value, double min, double max)
    Clamps a double-precision floating-point value to a specified range.
    static long
    clamp(long value, long min, long max)
    Clamps a long value to a specified range.
    static BigDecimal
    Clamps a BigDecimal value to a specified range.
    static double
    frac(double value)
    Returns the fractional part of the specified double-precision floating-point number.
    static BigDecimal
    Returns the fractional part of the specified decimal number.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • StiFunctionsMath

      public StiFunctionsMath()
  • Method Details

    • frac

      public static BigDecimal frac(BigDecimal value)
      Returns the fractional part of the specified decimal number.
      Parameters:
      value - A decimal number.
      Returns:
      The fractional part of the specified decimal number.
    • frac

      public static double frac(double value)
      Returns the fractional part of the specified double-precision floating-point number.
      Parameters:
      value - A double-precision floating-point number.
      Returns:
      The fractional part of the specified double-precision floating-point number.
    • clamp

      public static double clamp(double value, double min, double max)
      Clamps a double-precision floating-point value to a specified range.
      Parameters:
      value - The value to clamp.
      min - The minimum value of the range.
      max - The maximum value of the range.
      Returns:
      The clamped value.
    • clamp

      public static BigDecimal clamp(BigDecimal value, BigDecimal min, BigDecimal max)
      Clamps a BigDecimal value to a specified range.
      Parameters:
      value - The value to clamp.
      min - The minimum value of the range.
      max - The maximum value of the range.
      Returns:
      The clamped value.
      Throws:
      IllegalArgumentException - if any argument is null.
    • clamp

      public static long clamp(long value, long min, long max)
      Clamps a long value to a specified range.
      Parameters:
      value - The value to clamp.
      min - The minimum value of the range.
      max - The maximum value of the range.
      Returns:
      The clamped value.