Static
angleCalculate the angle between two vectors 计算两个向量之间的角度
Static
circleCheck if a circle and rectangle intersect 检查圆和矩形是否相交
Static
circlesCheck if two circles intersect 检查两个圆是否相交
Static
clampClamp a point to be within a rectangle 将点限制在矩形内
Static
closestCalculate the closest point on a line segment to a given point 计算线段上距离给定点最近的点
Static
distanceCalculate the distance between two points 计算两点之间的距离
Static
distanceCalculate the squared distance between two points (faster than distance) 计算两点之间的距离平方(比距离计算更快)
Static
getGet the bounding circle of a set of points 获取一组点的边界圆
Static
getGet the bounding rectangle of a set of points 获取一组点的边界矩形
Static
lineFind the intersection point of two lines (not segments) 找到两条直线(非线段)的交点
Static
lineCheck if two line segments intersect 检查两条线段是否相交
Static
pointCheck if a point is inside a polygon (using ray casting algorithm) 检查点是否在多边形内(使用射线投射算法)
Static
pointCheck if a point is inside a triangle 检查点是否在三角形内
Static
polygonStatic
polygonStatic
rectanglesStatic
triangleCalculate the area of a triangle 计算三角形的面积
Static
triangleCalculate the centroid of a triangle 计算三角形的重心
Utility functions for geometric calculations using fixed-point arithmetic 使用定点算术进行几何计算的实用函数