Documentation ¶
Index ¶
- func CalculateDistance(x1, y1, x2, y2 float64) float64
- func GetAngle(baseX, baseY, targetX, targetY float64) float64
- func GetRadians(baseX, baseY, targetX, targetY float64) float64
- func IsInsideCircle(cx, cy, radius, x, y float64) bool
- func RadiansToDegrees(radians float64) float64
- type Coord
- type Rect
- type Vector3
- func (p Vector3) Add(o Vector3) Vector3
- func (p *Vector3) Copy(o Vector3)
- func (p Vector3) DirToYaw() float32
- func (p Vector3) DistanceTo(o Vector3) Coord
- func (p Vector3) Mul(m Coord) Vector3
- func (p *Vector3) Normalize()
- func (p Vector3) Normalized() Vector3
- func (p Vector3) String() string
- func (p Vector3) Sub(o Vector3) Vector3
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsInsideCircle ¶
判断点是否在圆内 (cx, cy) 是圆心的坐标,radius 是圆的半径,(x, y) 是点的坐标
Types ¶
type Vector3 ¶
Vector3 is type of entity position
func (Vector3) DistanceTo ¶
DistanceTo calculates distance between two positions
func (Vector3) Normalized ¶
Click to show internal directories.
Click to hide internal directories.