Package org.libjpegturbo.turbojpeg
Class TJScalingFactor
java.lang.Object
org.libjpegturbo.turbojpeg.TJScalingFactor
Fractional scaling factor
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanequals(TJScalingFactor other) Returns true or false, depending on whether this instance andotherhave the same numerator and denominator.intgetDenom()Returns denominatorintgetNum()Returns numeratorintgetScaled(int dimension) Returns the scaled value ofdimension.booleanisOne()Returns true or false, depending on whether this instance is equal to 1/1.
-
Field Details
-
num
private int numNumerator -
denom
private int denomDenominator
-
-
Constructor Details
-
TJScalingFactor
- Throws:
Exception
-
-
Method Details
-
getNum
public int getNum()Returns numerator- Returns:
- numerator
-
getDenom
public int getDenom()Returns denominator- Returns:
- denominator
-
getScaled
public int getScaled(int dimension) Returns the scaled value ofdimension. This function performs the integer equivalent ofceil(dimension * scalingFactor).- Returns:
- the scaled value of
dimension
-
equals
Returns true or false, depending on whether this instance andotherhave the same numerator and denominator.- Returns:
- true or false, depending on whether this instance and
otherhave the same numerator and denominator
-
isOne
public boolean isOne()Returns true or false, depending on whether this instance is equal to 1/1.- Returns:
- true or false, depending on whether this instance is equal to 1/1
-