Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
trigonometry-calculator
Advanced tools
Readme
Completely solve trigonometry equations for angles and sides
Run:
npm install trigonometry-calculator --save
import { trigCalculator } from 'trigonometry-calculator';
// ES5 / CommonJS require works in addition to ES6 import
// var calculator = require('trigonometry-calculator');
// In ES5 call calculator.trigCalculator
let unsolvedTriangle = {
angles: { 2: 117 },
sides: { 0: 6.9, 1: 2.6 }
};
console.log(trigCalculator(unsolvedTriangle));
/*
{
angles: { 0: 47.00257739237024, 1: 15.997422607629744, 2: 117 },
sides: { 0: 6.9, 1: 2.6, 2: 8.405901446641815 }
}
*/
// If there is an alternate solution due to ambiguity that will be solved as well
unsolvedTriangle = {
angles: { 1: 31 },
sides: { 1: 8, 2: 13 }
};
console.log(trigCalculator(unsolvedTriangle));
/*
{
ambiguous: {
angles: { 0: 25.818060457931665, 1: 31, 2: 123.18193954206835 },
sides: { 0: 6.764779420434399, 1: 8, 2: 13 }
},
angles: { 0: 92.18193954206835, 1: 31, 2: 56.81806045793165 },
sides: { 0: 15.521570397820525, 1: 8, 2: 13 }
}
*/
A new function or a fixed regression should include matching test coverage. Commits should adhere to cz-conventional-changelog which can be done easily running git cz or npm run commit.
MIT License Copyright (c) 2017 Calvin Mikael
FAQs
Completely solve trigonometry equations for angles and sides
The npm package trigonometry-calculator receives a total of 729 weekly downloads. As such, trigonometry-calculator popularity was classified as not popular.
We found that trigonometry-calculator 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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.