Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: Math.sin

  1. #1
    JPM
    JPM is offline
    Regular Coder
    Join Date
    Mar 2004
    Location
    Norway
    Posts
    204
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Math.sin

    I need some help...
    How would you write the following with javascript? (getting the answer, not the setup...)
    Look at the attachment
    Attached Thumbnails Attached Thumbnails Math.sin-sin.gif  
    <JPM />

  • #2
    Regular Coder
    Join Date
    Jun 2004
    Posts
    565
    Thanks
    0
    Thanked 18 Times in 18 Posts
    Code:
    function asin_deg(y, hyp) {
      alert('x = ' + Math.asin(y / hyp) * 180 / Math.PI + '°');
    }
    asin_deg(5, 10);
    dumpfi

  • #3
    JPM
    JPM is offline
    Regular Coder
    Join Date
    Mar 2004
    Location
    Norway
    Posts
    204
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks! Is asin the same as sin-1 on the calculator/picture ?
    <JPM />

  • #4
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    asin is short for Arcsin which is Sin-1 (inverse sin) on a calculator


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •