How can Javascript be used to divide a circle equally so that it's correct to 1,000,000,000% zoom?
问题 Split off from: https://stackoverflow.com/questions/31076846/is-it-possible-to-use-javascript-to-draw-an-svg-that-is-precise-to-1-000-000-000 Using floating point precision, there are rounding errors when calculating the position of points on a circle. Example: function pointsOnACircle (whichpoint, numberOfPoints, cx, cy, radius) { //Returns a point along the outside of a circle, starting at (whichpoint=1) = 0 degrees eachpoint = whichpoint * 2 * Math.PI /numberOfPoints; var thiscx = cx +