Package hiiragi283.core.api
Class FractionsKt
-
- All Implemented Interfaces:
public final class FractionsKt
-
-
Method Summary
Modifier and Type Method Description final static Fractionfraction(Double value)final static Fractionfraction(Integer numerator, Integer denominator)final static Fractionfraction(Integer numerator)final static Fractionfraction(Float value)final static FractiontoFraction(Double $self)final static FractiontoFraction(Integer $self, Integer denominator)final static FractiontoFraction(Float $self)final static Fractionplus(Fraction $self, Fraction other)final static Fractionplus(Fraction $self, Integer other)final static Fractionplus(Integer $self, Fraction other)final static Fractionplus(Fraction $self, Float other)final static Fractionplus(Float $self, Fraction other)final static Fractionminus(Fraction $self, Fraction other)final static Fractionminus(Fraction $self, Integer other)final static Fractionminus(Integer $self, Fraction other)final static Fractionminus(Fraction $self, Float other)final static Fractionminus(Float $self, Fraction other)final static Fractiontimes(Fraction $self, Fraction other)final static Fractiontimes(Fraction $self, Integer other)final static Fractiontimes(Integer $self, Fraction other)final static Fractiontimes(Fraction $self, Float other)final static Fractiontimes(Float $self, Fraction other)final static Fractiondiv(Fraction $self, Fraction other)final static Fractiondiv(Fraction $self, Integer other)final static Fractiondiv(Integer $self, Fraction other)final static Fractiondiv(Fraction $self, Float other)final static Fractiondiv(Float $self, Fraction other)final static Pair<Integer, Fraction>split(Fraction $self)final static Integercomponent1(Fraction $self)final static Integercomponent2(Fraction $self)final static FractionfixedFraction(Integer amount, Integer capacity, Boolean loop)指定した引数から分数の新しいインスタンスを作成します。 final static FractionfixedFraction(Long amount, Long capacity)final static IntegercompareTo(Fraction $self, Integer other)final static IntegercompareTo(Integer $self, Fraction other)final static IntegercompareTo(Fraction $self, Float other)final static IntegercompareTo(Float $self, Fraction other)-
-
Method Detail
-
toFraction
final static Fraction toFraction(Double $self)
-
toFraction
final static Fraction toFraction(Integer $self, Integer denominator)
-
toFraction
final static Fraction toFraction(Float $self)
-
plus
final static Fraction plus(Fraction $self, Fraction other)
-
minus
final static Fraction minus(Fraction $self, Fraction other)
-
times
final static Fraction times(Fraction $self, Fraction other)
-
div
final static Fraction div(Fraction $self, Fraction other)
-
component1
final static Integer component1(Fraction $self)
- Since:
0.8.0
-
component2
final static Integer component2(Fraction $self)
- Since:
0.8.0
-
fixedFraction
final static Fraction fixedFraction(Integer amount, Integer capacity, Boolean loop)
指定した引数から分数の新しいインスタンスを作成します。
- Parameters:
amount- 分子となる値capacity- 分母となる値loop-trueの場合はamountをcapacityで割った剰余を,falseの場合はcapacity以下の値を分子に使用します
-
fixedFraction
final static Fraction fixedFraction(Long amount, Long capacity)
-
-
-
-