Tagged Questions
5
votes
2answers
630 views
Common mistakes with javascript arithmetic
I've ran into several oddities using javascripts floating point arithmetic, but I can never recall them off the top of my head!
What are some common mistakes when using JavaScript to do math?
2
votes
1answer
293 views
Randomly Generate Points in a Spiral Motion using Javascript
So I have a javascript program that currently gets random points, it generates a random x,y,z value around the center point, within the radius r
var maxArms = 3;
var i = 0;
var color = [];
...
1
vote
1answer
348 views
Find the new coordinates using a starting point, a distance, and an angle
Okay, say I have a point coordinate.
var coordinate = { x: 10, y: 20 };
Now I also have a distance and an angle.
var distance = 20;
var angle = 72;
The problem I am trying to solve is, if I want ...