mirror of
https://github.com/swc-project/swc.git
synced 2024-12-27 15:42:51 +03:00
31 lines
691 B
TypeScript
31 lines
691 B
TypeScript
// Loaded from https://deno.land/x/ramda@v0.27.2/source/divide.js
|
|
|
|
|
|
import _curry2 from './internal/_curry2.js';
|
|
|
|
|
|
/**
|
|
* Divides two numbers. Equivalent to `a / b`.
|
|
*
|
|
* @func
|
|
* @memberOf R
|
|
* @since v0.1.0
|
|
* @category Math
|
|
* @sig Number -> Number -> Number
|
|
* @param {Number} a The first value.
|
|
* @param {Number} b The second value.
|
|
* @return {Number} The result of `a / b`.
|
|
* @see R.multiply
|
|
* @example
|
|
*
|
|
* R.divide(71, 100); //=> 0.71
|
|
*
|
|
* const half = R.divide(R.__, 2);
|
|
* half(42); //=> 21
|
|
*
|
|
* const reciprocal = R.divide(1);
|
|
* reciprocal(4); //=> 0.25
|
|
*/
|
|
var divide = _curry2(function divide(a, b) { return a / b; });
|
|
export default divide;
|