math.fractions: make the numerator and denominator public (#11018)
parent
69f31d8d5c
commit
820669b011
|
@ -15,9 +15,9 @@ import math.bits
|
||||||
// 2. d cannot be set to zero. The factory function will panic.
|
// 2. d cannot be set to zero. The factory function will panic.
|
||||||
// 3. If provided d is negative, it will be made positive. n will change as well.
|
// 3. If provided d is negative, it will be made positive. n will change as well.
|
||||||
struct Fraction {
|
struct Fraction {
|
||||||
|
pub:
|
||||||
n i64
|
n i64
|
||||||
d i64
|
d i64
|
||||||
pub:
|
|
||||||
is_reduced bool
|
is_reduced bool
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue