Documentation ¶
Index ¶
- func Clamp(x, min, max float32) float32
- func Max(x, y float32) float32
- func Min(x, y float32) float32
- type Triangle
- func (t *Triangle) AppendVerticesIndices(vertices []ebiten.Vertex, indices []uint16, index int, cr, cg, cb, ca float32) ([]ebiten.Vertex, []uint16)
- func (t *Triangle) IntersectsCircle(p Vec2, radius float32) bool
- func (t *Triangle) Rotate(center Vec2, angle float32)
- func (t *Triangle) Scale(center Vec2, v float32)
- func (t *Triangle) Translate(x, y float32)
- type Vec2
- func (v *Vec2) Add(v2 Vec2)
- func (v *Vec2) Atan2() float32
- func (v *Vec2) DistanceSqTo(v2 Vec2) float32
- func (v *Vec2) DistanceTo(v2 Vec2) float32
- func (v *Vec2) Dot(v2 Vec2) float32
- func (v *Vec2) Equals(v2 Vec2) bool
- func (v *Vec2) Hypot(v2 Vec2) float32
- func (v *Vec2) IsZero() bool
- func (v *Vec2) Length() float32
- func (v *Vec2) MulN(n float32)
- func (v *Vec2) Normalize()
- func (v *Vec2) Project(v2 Vec2) Vec2
- func (v *Vec2) Rotate(center Vec2, angle float32)
- func (v *Vec2) Sub(v2 Vec2)
- type Vec3
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Triangle ¶
type Triangle struct {
A, B, C Vec2
}
func NewTriangle ¶
func (*Triangle) AppendVerticesIndices ¶
func (*Triangle) IntersectsCircle ¶
Click to show internal directories.
Click to hide internal directories.