Class RatioGauge.Ratio

  • Enclosing class:
    RatioGauge

    public static class RatioGauge.Ratio
    extends Object
    A ratio of one quantity to another.
    • Method Detail

      • of

        public static RatioGauge.Ratio of​(double numerator,
                                          double denominator)
        Creates a new ratio with the given numerator and denominator.
        Parameters:
        numerator - the numerator of the ratio
        denominator - the denominator of the ratio
        Returns:
        numerator:denominator
      • getValue

        public double getValue()
        Returns the ratio, which is either a double between 0 and 1 (inclusive) or NaN.
        Returns:
        the ratio