UNPKG

circle-to-polygon

Version:

Receives a Coordinate, a Radius and a Number of edges and aproximates a circle by creating a polygon that fills its area

7 lines (6 loc) 267 B
exports.validateBearing = function validateBearing(bearing) { if (typeof bearing !== "number") { const ARGUMENT_TYPE = Array.isArray(bearing) ? "array" : typeof bearing; throw new Error(`ERROR! Bearing has to be a number but was: ${ARGUMENT_TYPE}`); } };