Packages

 

com.aspose.imaging.fileformats.tiff

Class TiffSRational



  • public class TiffSRational
    extends Object

    The tiff rational type.

    • Field Detail

      • EPSILON

        public static final double EPSILON

        The epsilon for fraction calculation

        See Also:
        Constant Field Values
    • Constructor Detail

      • TiffSRational

        public TiffSRational()

        Initializes a new instance of the TiffSRational class.

      • TiffSRational

        public TiffSRational(int value)

        Initializes a new instance of the TiffRational class.

        Parameters:
        value - The nominator value.

        The nominator will be used as the value specified and denominator will be equal 1.

      • TiffSRational

        public TiffSRational(int nominator,
                             int denominator)

        Initializes a new instance of the TiffSRational class.

        Parameters:
        nominator - The nominator.
        denominator - The denominator.
    • Method Detail

      • approximateFraction

        public static TiffSRational approximateFraction(double value,
                                                        double epsilon)

        Approximates the provided value to a fraction.

        Parameters:
        value - The value.
        epsilon - The error allowed.
        Returns:
        A rational number having error less than epsilon.
      • approximateFraction

        public static TiffSRational approximateFraction(double value)

        Approximates the provided value to a fraction.

        Parameters:
        value - The value.
        Returns:
        A rational number having error less than Epsilon.
      • approximateFraction

        public static TiffSRational approximateFraction(float value,
                                                        double epsilon)

        Approximates the provided value to a fraction.

        Parameters:
        value - The value.
        epsilon - The error allowed.
        Returns:
        A rational number having error less than epsilon.
      • approximateFraction

        public static TiffSRational approximateFraction(float value)

        Approximates the provided value to a fraction.

        Parameters:
        value - The value.
        Returns:
        A rational number having error less than Epsilon.
      • getDenominator

        public int getDenominator()

        Gets the denominator.

        Value: The denominator.
      • getNominator

        public int getNominator()

        Gets the nominator.

        Value: The nominator.
      • getValue

        public float getValue()

        Gets the float value.

        Value: The float value.
      • getValueD

        public double getValueD()

        Gets the double value.

        Value: The double value.
      • toString

        public String toString()

        Returns a System.String that represents this instance.

        Overrides:
        toString in class Object
        Returns:
        A System.String that represents this instance.
      • equals

        public boolean equals(Object obj)

        Determines whether the specified Object is equal to this instance.

        Overrides:
        equals in class Object
        Parameters:
        obj - The Object to compare with this instance.
        Returns:
        true if the specified Object is equal to this instance; otherwise, false.
      • hashCode

        public int hashCode()

        Returns a hash code for this instance.

        Overrides:
        hashCode in class Object
        Returns:
        A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.