πŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more β†’
Socket
DemoInstallSign in
Socket

@thi.ng/geom-isec

Package Overview
Dependencies
Maintainers
1
Versions
284
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@thi.ng/geom-isec

2D/3D shape intersection checks

0.1.15
Source
npm
Version published
Weekly downloads
565
-7.22%
Maintainers
1
Weekly downloads
Β 
Created
Source

@thi.ng/geom-isec

npm (scoped) npm downloads Twitter Follow

This project is part of the @thi.ng/umbrella monorepo.

About

2D / 3D shape intersection tests:

2D tests

TypeCircleLinePolyRectTri
Circleβœ“
Lineβœ“
Pointβœ“βœ“βœ“βœ“βœ“
Rayβœ“βœ“βœ“βœ“
Rectβœ“βœ“

3D tests

TypeAABBSphere
AABBβœ“βœ“
Pointβœ“βœ“
Rayβœ“βœ“
Sphereβœ“

Installation

yarn add @thi.ng/geom-isec

Dependencies

Usage examples

import * as isec from "@thi.ng/geom-isec";

const res = isec.intersectLineLine([0,0], [100,50], [50,100], [50,-100]);
// { type: 4, isec: [ 50, 25 ], alpha: 0.5, beta: 0.375, det: -20000 }

res.type === isec.IntersectionType.INTERSECT
// true

Authors

  • Karsten Schmidt

License

Β© 2018 Karsten Schmidt // Apache Software License 2.0

Keywords

2D

FAQs

Package last updated on 24 Apr 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts