Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

apollonius

Package Overview
Dependencies
Maintainers
0
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apollonius - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

17

index.d.ts
// Type definitions of apollonius library
// Definitions by: Akseli Palén <akseli.palen@gmail.com>
//
export = Apollonius;
declare function Apollonius(c1: Apollonius.Circle2, c2: Apollonius.Circle2, c3: Apollonius.Circle2): Apollonius.Circle2 | null;
interface Circle2 {
x: number;
y: number;
r: number;
}
declare namespace Apollonius {
export interface Circle2 {
x: number;
y: number;
r: number;
}
}
declare function apollonius(c1: Circle2, c2: Circle2, c3: Circle2): Circle2 | null;
export = apollonius;

@@ -139,3 +139,3 @@ const epsilon = 0.0000000001 // epsilon from affineplane

module.exports = (c1, c2, c3) => {
const apollonius = function (c1, c2, c3) {
// Find a circle that is externally tangent to the three circles c1,c2,c3.

@@ -209,1 +209,3 @@ // If no such circle exists on the real plane, return null.

}
export default apollonius
{
"name": "apollonius",
"version": "0.2.0",
"version": "0.2.1",
"description": "Solves Apollonius' problem by finding a fourth circle tangent to three given circles",
"main": "index.js",
"types": "index.d.ts",
"type": "module",
"exports": "./index.js",
"types": "./index.d.ts",
"scripts": {
"lint": "standard",
"test:unit": "node test.js",
"test:unit": "node test/index.js",
"test:types": "tsc test/types.ts --esModuleInterop",
"test": "npm run lint && npm run test:unit",
"release": "npm test && npm publish"
},
"engines": {
"node": ">=18"
},
"repository": {

@@ -31,4 +36,5 @@ "type": "git",

"standard": "^17.1.2",
"tape": "^5.9.0"
"tape": "^5.9.0",
"typescript": "^5.6.3"
}
}

@@ -7,3 +7,5 @@ # apollonius

[![license](https://img.shields.io/npm/l/apollonius)](#license)
![NPM Type Definitions](https://img.shields.io/npm/types/apollonius?color=green)
The `apollonius` function finds a circle that touches three known circles. The resulting circle is a solution to the [Problem of Apollonius](https://en.wikipedia.org/wiki/Problem_of_Apollonius). In other words, it finds a circle that is *tangent to* each of the known three circles if such a circle exists and it usually does. The three known circles can be placed freely and are allowed to overlap each other.

@@ -10,0 +12,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc