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

apollonius

Package Overview
Dependencies
Maintainers
1
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.1 to 0.2.2

7

index.d.ts

@@ -11,4 +11,7 @@ // Type definitions of apollonius library

declare function apollonius(c1: Circle2, c2: Circle2, c3: Circle2): Circle2 | null;
interface Options {
epsilon: number;
}
export = apollonius;
export default function apollonius(c1: Circle2, c2: Circle2, c3: Circle2): Circle2 | null;
export const options: Options;

@@ -1,2 +0,5 @@

const epsilon = 0.0000000001 // epsilon from affineplane
const defaultEpsilon = 0.0000000001 // precision from affineplane
const libOptions = {
epsilon: defaultEpsilon // keep epsilon modifiable
}

@@ -17,2 +20,3 @@ const bitangent = (c1, c2) => {

const d = Math.sqrt(dx * dx + dy * dy)
const epsilon = libOptions.epsilon

@@ -78,2 +82,4 @@ if (d < epsilon) {

const epsilon = libOptions.epsilon
// First we handle the cases where the circle centers are equal.

@@ -141,3 +147,3 @@ // In these case a solution can be found only when the radii of the circles are equal.

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

@@ -158,2 +164,3 @@ // If no such circle exists on the real plane, return null.

//
const epsilon = libOptions.epsilon

@@ -214,1 +221,2 @@ // Circle differences

export default apollonius
export const options = libOptions
{
"name": "apollonius",
"version": "0.2.1",
"version": "0.2.2",
"description": "Solves Apollonius' problem by finding a fourth circle tangent to three given circles",
"type": "module",
"main": "./index.js",
"exports": "./index.js",

@@ -7,0 +8,0 @@ "types": "./index.d.ts",

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