Created
September 2, 2013 01:34
-
-
Save baamenabar/6408520 to your computer and use it in GitHub Desktop.
para calcular el largo de una espiral
This file contains hidden or 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 largo = 16.014; | |
var total = 16.014; | |
var ancho = 0.03; | |
var vueltas = 0; | |
for (largo=largo; largo>0; largo-=(ancho*6.28)){ | |
total+=largo; | |
console.log('total: ',total); | |
vueltas++; | |
} | |
console.log('total general: ',total); | |
console.log('vueltas: ',vueltas); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment