README
halve
Cut A Number into Two
features
- Simple
- Preserve Integer Types
install
npm install halve
usage
import halve from "halve";
const num = 5;
halve(num, { round: false });
// [ 2.5, 2.5 ]
halve(num { round: true });
// [3, 2]
Cut A Number into Two Parts. Preserve Integer Types.
<script type="module">
import halve from 'https://cdn.skypack.dev/halve';
</script>
Cut A Number into Two
npm install halve
import halve from "halve";
const num = 5;
halve(num, { round: false });
// [ 2.5, 2.5 ]
halve(num { round: true });
// [3, 2]