Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CeilEven ¶ added in v0.8.4
func CeilEven[T constraints.Integer](n T) T
接近n的最小偶数 eg: CeilEven(41) is 40, CeilEven(30) is also 30.
Types ¶
type Rational ¶ added in v0.3.0
type Rational[N, D constraints.Integer | constraints.Float] struct { Num N Den D }
func Fraction ¶ added in v0.3.0
func Fraction[N, D constraints.Integer | constraints.Float](num N, den D) *Rational[N, D]
Click to show internal directories.
Click to hide internal directories.