locutus
Version:
Locutus other languages' standard libraries to JavaScript for fun and educational purposes
17 lines (16 loc) • 572 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.atan = atan;
function atan(x) {
// discuss at: https://locutus.io/python/atan/
// parity verified: Python 3.12
// original by: Kevin van Zonneveld (https://kvz.io)
// note 1: Returns the arc tangent of x, in radians
// example 1: atan(0)
// returns 1: 0
// example 2: atan(1)
// returns 2: 0.7853981633974483
// example 3: atan(-1)
// returns 3: -0.7853981633974483
return Math.atan(x);
}