Documentation ¶
Index ¶
- func GenDigitsStr(n int) string
- func Limit[T constraints.Ordered](v, min, max T) T
- func LimitFloat64(v float64, min, max float64) float64
- func LimitInt(v int, min, max int) int
- func Max[T constraints.Ordered](s ...T) T
- func Min[T constraints.Ordered](s ...T) T
- func RoundFloat64(val float64, precision uint) float64
- type Intf
- type PointIntf
- type RectangleIntf
- func (r RectangleIntf) Add(p PointIntf) RectangleIntf
- func (r RectangleIntf) Dx() Intf
- func (r RectangleIntf) Dy() Intf
- func (r RectangleIntf) Empty() bool
- func (r RectangleIntf) Intersect(s RectangleIntf) RectangleIntf
- func (r RectangleIntf) Size() PointIntf
- func (r RectangleIntf) Sub(p PointIntf) RectangleIntf
- func (r RectangleIntf) ToRectCeilFloor() image.Rectangle
- func (r RectangleIntf) ToRectFloorCeil() image.Rectangle
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenDigitsStr ¶ added in v1.3.7
func Limit ¶ added in v1.3.7
func Limit[T constraints.Ordered](v, min, max T) T
func Max ¶ added in v1.3.0
func Max[T constraints.Ordered](s ...T) T
func Min ¶ added in v1.3.0
func Min[T constraints.Ordered](s ...T) T
func RoundFloat64 ¶ added in v1.3.3
Types ¶
type PointIntf ¶
type PointIntf struct {
X, Y Intf
}
func (PointIntf) In ¶
func (p PointIntf) In(r RectangleIntf) bool
func (PointIntf) ToPointCeil ¶
func (PointIntf) ToPointFloor ¶
type RectangleIntf ¶
type RectangleIntf struct {
Min, Max PointIntf
}
func RIntf ¶
func RIntf(r image.Rectangle) RectangleIntf
func (RectangleIntf) Add ¶
func (r RectangleIntf) Add(p PointIntf) RectangleIntf
func (RectangleIntf) Dx ¶ added in v1.3.7
func (r RectangleIntf) Dx() Intf
func (RectangleIntf) Dy ¶ added in v1.3.7
func (r RectangleIntf) Dy() Intf
func (RectangleIntf) Empty ¶
func (r RectangleIntf) Empty() bool
func (RectangleIntf) Intersect ¶
func (r RectangleIntf) Intersect(s RectangleIntf) RectangleIntf
func (RectangleIntf) Size ¶ added in v1.3.7
func (r RectangleIntf) Size() PointIntf
func (RectangleIntf) Sub ¶
func (r RectangleIntf) Sub(p PointIntf) RectangleIntf
func (RectangleIntf) ToRectCeilFloor ¶ added in v1.3.7
func (r RectangleIntf) ToRectCeilFloor() image.Rectangle
contracts
func (RectangleIntf) ToRectFloorCeil ¶
func (r RectangleIntf) ToRectFloorCeil() image.Rectangle
expands
Click to show internal directories.
Click to hide internal directories.