Skip to content

@technobuddha > library > Geometry > Coordinates

Function: isPolar()

ts
function isPolar(point: unknown): point is Polar;

Defined in: is-polar.ts:18

Determines if the provided value is a Polar point.

A value is considered a Polar point if it is a non-null object that contains numeric φ and r properties.

Parameters

ParameterTypeDescription
pointunknownThe value to test for Polar structure.

Returns

point is Polar

true if the value is a Polar point, otherwise false.

Example

typescript
isPolar({ r: 10, φ: 20 }); // true
isPolar({ x: 10, y: 20 }); // false