Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 142382

I need this script to output the circumference of a circle with a changing radius over time

$
0
0

So far this is what I've set up and it's not throwing up any sort of console errors in Repl so I'm not sure what it could be. I'm not sure if there's another way of outputting a result or what but I'd appreciate the help.

'''<!DOCTYPE html>
    <html>
      <head>
        Timely Measurements
      </head>
        <script>

    var d = new Date();
    var n = d.getHours();

    var R = (d.getHours() + 2)

    //function circum(){
      var circum = (2 * Math.PI * R)
    //Math.round(num * 100) / 100


    function roundnum(circum){
      Math.round( circum * 100 + Number.EPSILON ) / 100
    }

    roundnum(circum)

        </script>`enter code here`
    <body>
      </body>
    </html>
'''

Viewing all articles
Browse latest Browse all 142382

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>