Versions in this module Expand all Collapse all v0 v0.1.1 Dec 13, 2016 Changes in this version + const Phi + const Pi + const Tau + var Blue = Color + var Green = Color + var Red = Color + var Zero2 = V2 + func Abs(a float32) float32 + func ApplyDeadZone(v float32, deadZone float32) float32 + func Atan(v float32) float32 + func Atan2(y, x float32) float32 + func Clamp(a, low, high float32) float32 + func Clamp01(a float32) float32 + func ClampUnit(a float32) float32 + func Cos(v float32) float32 + func DegToRad(deg float32) float32 + func EnforceInside(pos, vel *V2, bounds Rect, dampening float32) + func Lerp(a, b, p float32) float32 + func LerpClamp(a, b, p float32) float32 + func Max(a, b float32) float32 + func Min(a, b float32) float32 + func MinMax(a, b float32) (float32, float32) + func Mod(x, y float32) float32 + func Pow(v, e float32) float32 + func RadToDeg(rad float32) float32 + func RandomBetween(a, b float32) float32 + func Sat8(v float32) uint8 + func Sin(v float32) float32 + func Sqr(v float32) float32 + func Sqrt(v float32) float32 + type Color struct + A uint8 + B uint8 + G uint8 + R uint8 + func ColorFloat(r, g, b, a float32) Color + func ColorHSL(h, s, l float32) Color + func ColorHSLA(h, s, l, a float32) Color + func ColorHex(hex uint32) Color + func LerpColor(a, b Color, p float32) Color + func (c Color) Float() (r, g, b, a float32) + func (c Color) RGBA() (r, g, b, a uint8) + func (c Color) WithAlpha(a uint8) Color + type Font struct + GlyphSize V2 + Glyphs string + GlyphsPerRow int + Texture *Texture + func (font *Font) Draw(text string, position V2, glyphHeight float32) + func (font *Font) DrawColored(text string, position V2, glyphHeight float32, color Color) + func (font *Font) DrawLines(lines []string, position V2, glyphHeight, lineHeight float32) + func (font *Font) Width(text string, glyphHeight float32) float32 + type Radian float32 + type Rect struct + Max V2 + Min V2 + func NewCircleRect(r float32) Rect + func NewRect(w, h float32) Rect + func (r Rect) Contains(p V2) bool + func (r Rect) Offset(delta V2) Rect + func (r Rect) ScaleInv(v V2) Rect + func (r Rect) Size() V2 + type Texture struct + ID uint32 + Path string + RGBA *image.RGBA + Repeat bool + Size V2 + func (tex *Texture) Delete() + func (tex *Texture) Draw(dst Rect) + func (tex *Texture) DrawColored(dst Rect, color Color) + func (tex *Texture) DrawSub(dst Rect, src Rect) + func (tex *Texture) DrawSubColored(dst Rect, src Rect, color Color) + func (tex *Texture) Line(from, to V2, width float32) + func (tex *Texture) LineColored(from, to V2, width float32, color Color) + func (tex *Texture) Reload() + func (tex *Texture) Upload() + type V2 struct + X float32 + Y float32 + func ClampLength(a V2, maxsize float32) V2 + func RandomV2(r Rect) V2 + func RandomV2Circle(radius float32) V2 + func (a V2) Add(b V2) V2 + func (a V2) AddScale(b V2, s float32) V2 + func (a V2) Angle() float32 + func (a V2) Cross(b V2) float32 + func (a V2) Distance(b V2) float32 + func (a V2) Distance2(b V2) float32 + func (a V2) Dot(b V2) float32 + func (a V2) Length() float32 + func (a V2) Length2() float32 + func (a V2) NearZero() bool + func (a V2) Negate() V2 + func (a V2) Normalize() V2 + func (a V2) Rotate(angle float32) V2 + func (a V2) Rotate180() V2 + func (a V2) Rotate90() V2 + func (a V2) Rotate90c() V2 + func (a V2) Scale(s float32) V2 + func (a V2) Sub(b V2) V2 + func (a V2) XY() (x, y float32) + func (a V2) XYZ() (x, y, z float32)