JGTools / JGMath

Math utils

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JGMath

npm npm GitHub

Math utils

Installation

Using npm

npm i @jgtools/jgmath
// import all functions using a namespace
import * as JGMath from "@jgtools/jgmath";
// or import functions individually
import { getAngle } from "@jgtools/jgmath";
// ...

Using cdn

<script type="module">
    // import all functions using a namespace
    import * as JGMath from "https://cdn.jsdelivr.net/npm/@jgtools/jgmath@1.0.7/dist/index.min.js";
    // or import functions individually
    import { getAngle } from "https://cdn.jsdelivr.net/npm/@jgtools/jgmath@1.0.7/dist/index.min.js";
    // ...
</script>

Usage

import { getAngle } from "@jgtools/jgmath";

const p1 = { x: 1, y: 2 };
const p2 = { x: 5, y: 5 };
const a = getAngle(p1, p2);

License

MIT

About

Math utils

License:MIT License


Languages

Language:TypeScript 100.0%