Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
robust-orientation
Advanced tools
Robust orientation test for n-simplices. Based on the work of Jonathan Shewchuk:
This implementation is robust in the sense that the answers returned are exact, but it is not fully adaptive. Basically an initial test is computed, and if the accuracy of this is too low then an exact version of the test is executed. Compared to Shewchuk's original C code this is slower, but eventually I hope to make improvements that bring the performance closer in line to his version.
var orientation = require("robust-orientation")
console.log(orientation([0, 0], [1e-64, 0], [0, 1]))
npm install robust-orientation
var orient = require("robust-orientation")
orient(p0, p1, p2, ...)
Exactly computes the orientation of a collection of (n+1) points in n-dimensions.
p0,p1,p2,...
is a list of pointsReturns The orientation of the point set:
<0
if the tuple of points is positively oriented>0
if the tuple of points is negatively oriented=0
if the points are coplanarNote For up to 5 points, you can directly call an optimized orientation routine, thus avoiding an extra dispatch/switch statement by calling orient[d]
, where d
is the number of points. Eg.
orient[3](p0, p1, p2) === orient(p0, p1, p2)
(c) 2013 Mikola Lysenko. MIT License
FAQs
Exactly computes the orientation of a tuple of points
The npm package robust-orientation receives a total of 76,305 weekly downloads. As such, robust-orientation popularity was classified as popular.
We found that robust-orientation demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.