Last active
January 3, 2016 07:29
-
-
Save wprater/8430194 to your computer and use it in GitHub Desktop.
scaled agngle within min bounds
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var radiusEarth = 6372.796924; | |
var dist = 2.0; | |
var maxAngle = dist / radiusEarth; | |
var minAngle = 0.25 / radiusEarth; | |
var cosdif = Math.cos(maxAngle) - 1; | |
var fuzzScale = Math.random() * (0.999999 - minAngle) + minAngle; | |
var scaledDist = Math.acos(fuzzScale * cosdif + 1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment