Documentation ¶
Index ¶
- Constants
- Variables
- func Clamp(x, min, max float64) float64
- func DegToRad(deg float64) float64
- func Equal(a, b float64) bool
- func RadToDeg(rad float64) float64
- type Mat3
- func (m Mat3) Apply(g *ebiten.GeoM)
- func (m Mat3) Det() float64
- func (m Mat3) Inverse() Mat3
- func (m Mat3) IsInvertible() bool
- func (m Mat3) Mul(o Mat3) Mat3
- func (m Mat3) MulVec(v Vec2) Vec2
- func (m Mat3) MulVertexDst(v []ebiten.Vertex)
- func (m Mat3) Rotate(theta float64) Mat3
- func (m Mat3) Scale(sx, sy float64) Mat3
- func (m Mat3) ScaleAll(s float64) Mat3
- func (m Mat3) ScaleVec(v Vec2) Mat3
- func (m Mat3) Translate(x, y float64) Mat3
- func (m Mat3) TranslateVec(v Vec2) Mat3
- type Rect
- type Vec2
- func (v Vec2) Add(x, y float64) Vec2
- func (v Vec2) AddVec(other Vec2) Vec2
- func (v Vec2) DistanceTo(other Vec2) float64
- func (v Vec2) Div(f float64) Vec2
- func (v Vec2) Equals(other Vec2) bool
- func (v Vec2) Interpolate(other Vec2, t float64) Vec2
- func (v Vec2) Length() float64
- func (v Vec2) MoveTo(other Vec2, length float64) Vec2
- func (v Vec2) Mul(f float64) Vec2
- func (v Vec2) Neg() Vec2
- func (v Vec2) Norm(length float64) Vec2
- func (p Vec2) String() string
- func (v Vec2) Sub(x, y float64) Vec2
- func (v Vec2) SubVec(other Vec2) Vec2
Constants ¶
View Source
const ( Pi = 3.1415926535897932384626433832795028841971693993751058209749445923 Pi2 = 6.2831853071795864769252867665590057683943387987502116419498891846 PiDiv180 = 0.0174532925199432957692369076848861271344287188854172545609719144 PiDiv180Inv = 57.295779513082320876798154814105170332405472466564321549160243861 )
Variables ¶
View Source
var Mat3One = Mat3{
1.0, 0.0, 0.0,
0.0, 1.0, 0.0,
0.0, 0.0, 1.0,
}
View Source
var Vec2Zero = Vec2{0.0, 0.0}
Functions ¶
Types ¶
type Mat3 ¶
type Mat3 [9]float64
func NewScaleAll ¶
func NewScaleVec ¶
func NewTranslate ¶
func NewTranslateVec ¶
func (Mat3) IsInvertible ¶
func (Mat3) MulVertexDst ¶
func (m Mat3) MulVertexDst(v []ebiten.Vertex)
func (Mat3) TranslateVec ¶
type Rect ¶
func (Rect) CenterVec2 ¶
Click to show internal directories.
Click to hide internal directories.