mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
math.fractions: make the numerator and denominator public (#11018)
This commit is contained in:
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
Block a user