math

package
Version: v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AtomicFloat

type AtomicFloat struct {
	// contains filtered or unexported fields
}

func NewAtomicFloat

func NewAtomicFloat(f float64) AtomicFloat

func (*AtomicFloat) Add

func (f *AtomicFloat) Add(n float64)

func (*AtomicFloat) Get

func (f *AtomicFloat) Get() float64

func (*AtomicFloat) Set

func (f *AtomicFloat) Set(n float64)

type Point

type Point struct {
	// contains filtered or unexported fields
}

Point is a thread-safe implementation of SDL_POINT

func NewPoint

func NewPoint(x, y int32) Point

func (*Point) AddPos

func (p *Point) AddPos(s Point)

func (*Point) AddX

func (p *Point) AddX(x int32)

func (*Point) AddXY

func (p *Point) AddXY(x, y int32)

func (*Point) AddY

func (p *Point) AddY(y int32)

func (Point) Equal

func (p Point) Equal(s Point) bool

func (*Point) GetX

func (p *Point) GetX() int32

func (*Point) GetXY

func (p *Point) GetXY() (int32, int32)

func (*Point) GetY

func (p *Point) GetY() int32

func (Point) SDLPoint

func (p Point) SDLPoint() *sdl.Point

func (*Point) SetPos

func (p *Point) SetPos(s Point)

func (*Point) SetX

func (p *Point) SetX(x int32)

func (*Point) SetXY

func (p *Point) SetXY(x, y int32)

func (*Point) SetY

func (p *Point) SetY(y int32)

type Rect

type Rect struct {
	// contains filtered or unexported fields
}

func NewRect

func NewRect(x, y, w, h int32) Rect

func (*Rect) AddH

func (r *Rect) AddH(h int32)

func (*Rect) AddW

func (r *Rect) AddW(w int32)

func (*Rect) AddWH

func (r *Rect) AddWH(w, h int32)

func (*Rect) AddX

func (r *Rect) AddX(x int32)

func (*Rect) AddXY

func (r *Rect) AddXY(x, y int32)

func (*Rect) AddY

func (r *Rect) AddY(y int32)

func (*Rect) Equals

func (r *Rect) Equals(s Rect) bool

func (*Rect) GetH

func (r *Rect) GetH() int32

func (*Rect) GetW

func (r *Rect) GetW() int32

func (*Rect) GetWH

func (r *Rect) GetWH() (int32, int32)

func (*Rect) GetX

func (r *Rect) GetX() int32

func (*Rect) GetXY

func (r *Rect) GetXY() (int32, int32)

func (*Rect) GetY

func (r *Rect) GetY() int32

func (*Rect) SDLRect

func (r *Rect) SDLRect() *sdl.Rect

func (*Rect) SetH

func (r *Rect) SetH(h int32)

func (*Rect) SetPos

func (r *Rect) SetPos(s Rect)

func (*Rect) SetRect

func (r *Rect) SetRect(s Rect)

func (*Rect) SetW

func (r *Rect) SetW(w int32)

func (*Rect) SetWH

func (r *Rect) SetWH(w, h int32)

func (*Rect) SetX

func (r *Rect) SetX(x int32)

func (*Rect) SetXY

func (r *Rect) SetXY(x, y int32)

func (*Rect) SetXYWH

func (r *Rect) SetXYWH(x, y, w, h int32)

func (*Rect) SetY

func (r *Rect) SetY(y int32)

type Transform

type Transform struct {
	Rect
	Rotation AtomicFloat
	Center   Point
}

func NewTransform

func NewTransform(x, y, w, h int32, rot float64, center Point) Transform

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto