Generating a sin wave


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. var time = new Date().getTime() * 0.002;
  2. var degrees = Math.sin( time ) * 5;

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.