Documentation ¶
Index ¶
- Variables
- func Abs(value int) int
- func AsUint16(val int) uint16
- func Clamp(value, min, max int) int
- func Max(first int, second int) int
- func Max16(first int16, second int16) int16
- func Max32(first int32, second int32) int32
- func Min(first int, second int) int
- type Rect
- type Size
- type Vec2
- func (v Vec2) Add(other Vec2) Vec2
- func (v Vec2) Center(other Vec2) Vec2
- func (v Vec2) Clamp(min, max Vec2) Vec2
- func (v Vec2) GT(other Vec2) bool
- func (v Vec2) GTE(other Vec2) bool
- func (v Vec2) IsZero() bool
- func (v Vec2) LT(other Vec2) bool
- func (v Vec2) LTE(other Vec2) bool
- func (v Vec2) Scalar(value int) Vec2
- func (v Vec2) Sub(other Vec2) Vec2
Constants ¶
This section is empty.
Variables ¶
View Source
var DEFAULT_SIZE = Vec2{
R: 24,
C: 80,
}
View Source
var UnitVec2 = Vec2{R: 1, C: 1}
Functions ¶
Types ¶
type Rect ¶
type Rect struct {
Position, Size Vec2
}
func (Rect) BottomRight ¶ added in v0.1.11
Get the position of the bottom-right corner of the Rect.
type Vec2 ¶
func GetMaximum ¶
Find the largest rectangle that both rectangle `a` and `b` can fit.
func NormalizeRange ¶ added in v0.1.13
Click to show internal directories.
Click to hide internal directories.