Packages

 

com.aspose.cad.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

      • 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.
      • 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.
      • 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.
      • op_Equality

        public static boolean op_Equality(TiffSRational rational1,
                                          TiffSRational rational2)

        Returns the comparison result of the two rational numbers.

        Parameters:
        rational1 - The first rational to compare.
        rational2 - The second rational to compare.
        Returns:
        The comparison result.
      • op_Inequality

        public static boolean op_Inequality(TiffSRational rational1,
                                            TiffSRational rational2)

        Returns the negative comparison result of the two rational numbers.

        Parameters:
        rational1 - The first rational to compare.
        rational2 - The second rational to compare.
        Returns:
        The negative comparison result.
      • equals

        public boolean equals(Object obj)

        Determines whether the specified System.Object is equal to this instance.

        Overrides:
        equals in class Object
        Parameters:
        obj - The System.Object to compare with this instance.
        Returns:
        true if the specified System.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.