Appearance
函数: angle()
angle(
startPoint:Coord,midPoint:Coord,endPoint:Coord,options?: {explementary?:boolean;mercator?:boolean; }):number
Function
Finds the angle formed by two adjacent segments defined by 3 points. The result will be the (positive clockwise) angle with origin on the startPoint-midPoint segment, or its explementary angle if required.
参数
startPoint
Start Point Coordinates
midPoint
Mid Point Coordinates
endPoint
End Point Coordinates
options?
Optional parameters
explementary?
boolean
Returns the explementary angle instead (360 - angle)
mercator?
boolean
if calculations should be performed over Mercator or WGS84 projection
返回
number
Angle between the provided points, or its explementary.
示例
ts
turf.angle([5, 5], [5, 6], [3, 4]);
//=45