UNPKG

locutus

Version:

Locutus other languages' standard libraries to JavaScript for fun and educational purposes

10 lines (9 loc) 393 B
export function acos(arg) { // discuss at: https://locutus.io/ruby/Math/acos/ // original by: Onno Marsman (https://twitter.com/onnomarsman) // note 1: Sorry about the crippled test. // note 1: Needed because precision differs accross platforms. // example 1: (acos(0.3) + '').substr(0, 17) // returns 1: '1.266103672779499' return Math.acos(arg); }