Documentation
¶
Index ¶
- func AngleBetweenPoints(v1, v2 Point) float64
- func AngleBetweenVectors(pA, pB, qA, qB Point) float64
- func IsPointInRectangle(p Point, rCenter Point, w, h, angleDeg float64) bool
- func NormalizeAngleDegrees(theta float64) float64
- func RectangleCorners(rCenter Point, w, h, angleDeg float64) [][]float64
- func VectorAngle(p1, p2 Point) float64
- func VectorLength(p1, p2 Point) float64
- type AffineMatrix
- type Point
- type Point3D
- type Rectangle
- type Triangle
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AngleBetweenPoints ¶ added in v0.3.0
计算同坐标两个向量之间的角度
func AngleBetweenVectors ¶ added in v0.3.0
已知两点在两平面坐标系中的坐标,求坐标系夹角,A旋转到B的度数,逆时针>0 AngleBetweenVectors
func IsPointInRectangle ¶ added in v0.1.9
图片就是第四象限,角度90+θ
func NormalizeAngleDegrees ¶ added in v0.1.9
func RectangleCorners ¶ added in v0.1.12
func VectorAngle ¶ added in v0.3.0
VectorAngle 计算向量与 x 轴之间的角度(以度为单位)
func VectorLength ¶ added in v0.3.0
VectorLength 计算两点之间的向量长度
Types ¶
type Point ¶
Point 结构体用于表示一个点
func RandomPoint ¶ added in v0.1.9
func RotatePoint ¶ added in v0.1.9
RotatePoint 计算点 (x, y) 绕点 (centerX, centerY) 旋转 angle 度后的新坐标
func TranslateRotationTransformByPointAndAngle ¶ added in v0.3.0
TranslateRotationTransformByPointAndAngle transforms a point from coordinate system a2 to a1 在数学和计算机图形学中,旋转角度的正负通常遵循右手定则。默认情况下,顺时针方向被认为是负的,而逆时针方向被认为是正的。 O2相对于O1旋转度数
Click to show internal directories.
Click to hide internal directories.