UNPKG

648 BMarkdownView Raw
1<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
2
3# Function splitUnit
4
5Split a unit in an array of units whose sum is equal to the original unit.
6
7
8## Syntax
9
10```js
11splitUnit(unit: Unit, parts: Array.<Unit>)
12```
13
14### Parameters
15
16Parameter | Type | Description
17--------- | ---- | -----------
18`parts` | Array | An array of strings or valueless units.
19
20### Returns
21
22Type | Description
23---- | -----------
24Array | An array of units.
25
26
27## Examples
28
29```js
30math.splitUnit(new Unit(1, 'm'), ['feet', 'inch'])
31// [ 3 feet, 3.3700787401575 inch ]
32```
33
34
35## See also
36
37[unit](unit.md)