MCPcopy Create free account
hub / github.com/esengine/esengine / triArea2

Method triArea2

packages/pathfinding/src/navmesh/NavMesh.ts:560–562  ·  view source on GitHub ↗

* @zh 计算三角形面积的两倍(用于判断点的相对位置) * @en Calculate twice the triangle area (for point relative position)

(a: IPoint, b: IPoint, c: IPoint)

Source from the content-addressed store, hash-verified

558 * @en Calculate twice the triangle area (for point relative position)
559 */
560 private triArea2(a: IPoint, b: IPoint, c: IPoint): number {
561 return (c.x - a.x) * (b.y - a.y) - (b.x - a.x) * (c.y - a.y);
562 }
563
564 /**
565 * @zh 计算路径总长度

Callers 1

funnelPathMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected