multiply
math
Multiply two numbers.
Installation
Import
import { multiply } from '@tulx/utils';Source Code
Implementation
/**
* Multiply two numbers.
*
* @param multiplier - The first number in a multiplication.
* @param multiplicand - The second number in a multiplication.
* @returns Returns the product.
*
* @example
* ```ts
* multiply(6, 4); // 24
* ```
*/
export function multiply(multiplier: number, multiplicand: number): number {
return multiplier * multiplicand;
}
Example
import { multiply } from '@tulx/utils';
multiply(6, 4); // 24Related Functions
add
Adds two numbers.
ceil
Computes number rounded up to precision.
divide
Divide two numbers.
floor
Computes number rounded down to precision.
max
Computes the maximum value of array.
maxBy
This method is like max except that it accepts iteratee which is invoked for each element in array to generate the criterion by which the value is ranked.