UNPKG

locutus

Version:

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

16 lines (15 loc) 616 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.truediv = truediv; const _operator_ts_1 = require("../_helpers/_operator.js"); function truediv(a, b) { // discuss at: https://locutus.io/python/operator/truediv/ // parity verified: Python 3.12 // original by: Kevin van Zonneveld (https://kvz.io) // note 1: Performs Python-style true division. // example 1: truediv(7, 2) // returns 1: 3.5 // example 2: truediv(true, 4) // returns 2: 0.25 return (0, _operator_ts_1.pythonTrueDiv)(a, b, 'truediv'); }