# @antv/g-math

> Geometry util

Latest version **3.1.0** (published 2025-12-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install @antv/g-math
pnpm add @antv/g-math
yarn add @antv/g-math
bun add @antv/g-math
```

## Health

**Score 55/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 3.1.0 |
| Published | 2025-12-22 |
| First published | 2019-09-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 268.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1215 |
| Author | https://github.com/orgs/antvis/people |
| Maintainers | lvisei, freestyle21, soundquiet, elaine.q.10, sturuby, sakuya223, serializedowen, xdzhao, yangzhanmei, wjgogogo, leungwensen, dori, iaaron, yard, simaq, dxq613, intchous, susan_ann, jinke.li, lzxue, army8735, atool, baizn, dengfuping, neoddish, jeffy2012, zqlu, afc163, pomelo-nwu, kopiluwaky, ccnuzindex, panyuqi, bubkoo, zengyue, kasmine, boyu.zlj, l1ud0ngq1, newbyvector, winniexing, chenluli, kn9117, xdddst, semious2020, esora, nadia_liu, bbsqq, mxz96102, openwayne, pearmini, pddpd, yiqianyao, zhanba, cxxxxxn, laixingui.lxg, susiwen8, yanxiong, zeyuwang, rainy25ghz, zhangjunjie-loki, flash1, yisi.wang, dreammy23, biupiubiupiu, basketduck, xuying1027, banxuan, bqxbqxbqx, alex_zjt, duxinyue023, wang1212, leondt1, gaofuhong |
| Keywords | antv, g |

## Links

- npm: https://www.npmjs.com/package/@antv/g-math
- Repository: https://github.com/antvis/g
- Homepage: https://github.com/antvis/g#readme
- Issues: https://github.com/antvis/g/issues
- npm.io page: https://npm.io/package/@antv/g-math

## Dependencies (4)

- [tslib](https://npm.io/package/tslib.md) ^2.5.3
- [gl-matrix](https://npm.io/package/gl-matrix.md) ^3.4.3
- [@antv/util](https://npm.io/package/@antv/util.md) ^3.3.5
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.25.6

## Alternatives

- [angular-pipes](https://npm.io/package/angular-pipes.md) — 5.6K weekly downloads
- [@ng-web-apis/midi](https://npm.io/package/@ng-web-apis/midi.md) — 2.6K weekly downloads
- [happn-3](https://npm.io/package/happn-3.md) — 1.6K weekly downloads
- [@opensip-cli/lang-go](https://npm.io/package/@opensip-cli/lang-go.md) — 1.2K weekly downloads
- [mongoose-typescript](https://npm.io/package/mongoose-typescript.md) — 85 weekly downloads

## Recent versions

- 3.1.0 (latest) — 2025-12-22
- 3.0.2-beta.0 (beta) — 2025-12-15
- 2.0.3-next.6 (next) — 2024-03-13
- 1.8.0-alpha.1 (alpha) — 2023-06-26
- 3.0.1 — 2025-05-09
- 3.0.0 — 2024-03-21
- 2.0.3-next.5 — 2024-03-12
- 2.0.3-next.4 — 2024-03-12
- 2.0.3-next.3 — 2024-03-11
- 2.0.3-next.2 — 2024-03-07
- 2.0.3-next.1 — 2024-03-07
- 2.0.3-next.0 — 2024-03-05
- 2.0.2 — 2023-07-26
- 2.0.1 — 2023-06-29
- 2.0.0 — 2023-06-27
- … 143 more at https://npm.io/package/@antv/g-math/versions

## README

# g-math

> 为 `G` 提供几何图形运算的库

## 安装下载

> tnpm i --save @antv/g-math

```js
// 所有的 api 是都这么引入，名字不同而已
import { line } from '@antv/g-math';

const len = line.length(x1, x2, x2, y2);
```

## API 文档

> 目前使用到的、且推荐使用的 API 文档，不在文档内的不建议使用。

---
_Source: https://npm.io/package/@antv/g-math · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
