@lou.codes/math
TypeScript icon, indicating that this package has built-in type declarations

1.1.4 • Public • Published

Coverage License NPM Version Open Issues Size

🧮 Precise basic math operations. Using this library, adding 0.1 to 0.2 will give you 0.3, which might sound like nothing, but that's not the default behavior of JavaScript.

Usage

📦 Node

Install @lou.codes/math as a dependency:

pnpm add @lou.codes/math
# or
npm install @lou.codes/math
# or
yarn add @lou.codes/math

Import it and use it:

import { chain } from "@lou.codes/math";

chain(0.2).add(0.1); // 0.3 🪄

🦕 Deno

Import @lou.codes/math using the npm: prefix, and use it directly:

import { chain } from "npm:@lou.codes/math";

chain(0.2).add(0.1); // 0.3 🪄

🌎 Browser

Import @lou.codes/math using esm.sh, and use it directly:

<script type="module">
	import { chain } from "https://esm.sh/@lou.codes/math";

	chain(0.2).add(0.1); // 0.3 🪄
</script>

Useful links

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.1.45latest

Version History

VersionDownloads (Last 7 Days)Published
1.1.45
1.1.32
1.1.21
1.1.11
1.1.00
1.0.30
1.0.20
1.0.10
1.0.00

Package Sidebar

Install

npm i @lou.codes/math

Weekly Downloads

7

Version

1.1.4

License

MIT

Unpacked Size

26.8 kB

Total Files

37

Last publish

Collaborators

  • loucyx