Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CeilEven ¶
func CeilEven[T constraints.Integer](n T) T
接近n的最小偶数 eg: CeilEven(41) is 40, CeilEven(30) is also 30.
func Position ¶
func Position[T constraints.Integer](outW, outH, w, h, xp, yp T) (T, T)
Types ¶
type Rational ¶
type Rational[N, D constraints.Integer | constraints.Float] struct { Num N Den D }
func Fraction ¶
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.