public class Fraction extends Object
Constructor and Description |
---|
Fraction()
Instantiate a
Fraction with a value of 1 |
Fraction(long numerator,
long denominator)
Creates a new fraction with the respective values
|
Modifier and Type | Method and Description |
---|---|
Fraction |
clone() |
void |
div(Fraction fraction) |
long |
getDenominator() |
long |
getNumerator() |
double |
getRatio() |
void |
invert()
Inverts this fraction by exchanging numerator and denominator
|
void |
mul(Fraction fraction) |
long |
mulCeil(long value)
Multiply the value with this fraction.
|
public Fraction(long numerator, long denominator)
numerator
- (above fraction bar)denominator
- (below fraction bar)public Fraction()
Fraction
with a value of 1public long getNumerator()
public long getDenominator()
public double getRatio()
public void invert()
public void mul(Fraction fraction)
public void div(Fraction fraction)
public long mulCeil(long value)
value
- Copyright © 2015–2022 ImgLib2. All rights reserved.