locutus
Version:
Locutus other languages' standard libraries to JavaScript for fun and educational purposes
14 lines (13 loc) • 423 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.tan = tan;
function tan(x) {
// discuss at: https://locutus.io/ruby/Math/tan/
// parity verified: Ruby 3.3
// original by: Kevin van Zonneveld (https://kvz.io)
// example 1: tan(0)
// returns 1: 0
// example 2: tan(1)
// returns 2: 1.5574077246549023
return Math.tan(x);
}