https://github.com/deusallrising/math-base-special-atan2d
Compute the angle in the plane (in degrees) between the positive x-axis and the ray from (0,0) to the point (x,y).
https://github.com/deusallrising/math-base-special-atan2d
arctangent atan atan2 atan2d inverse javascript mathematics nodejs number quotient stdlib trig trigonometry value
Last synced: about 2 months ago
JSON representation
Compute the angle in the plane (in degrees) between the positive x-axis and the ray from (0,0) to the point (x,y).
- Host: GitHub
- URL: https://github.com/deusallrising/math-base-special-atan2d
- Owner: Deusallrising
- License: apache-2.0
- Created: 2025-04-04T13:34:13.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2025-04-09T18:50:23.000Z (about 2 months ago)
- Last Synced: 2025-04-09T18:55:59.649Z (about 2 months ago)
- Topics: arctangent, atan, atan2, atan2d, inverse, javascript, mathematics, nodejs, number, quotient, stdlib, trig, trigonometry, value
- Language: Python
- Size: 240 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Citation: CITATION.cff
- Security: SECURITY.md
Awesome Lists containing this project
README
```markdown
# 🧮 Math Base Special Atan2dCompute the angle in the plane (in degrees) between the positive x-axis and the ray from (0,0) to the point (x,y).

## Table of Contents
1. [Features](#features)
2. [Installation](#installation)
3. [Usage](#usage)
4. [Examples](#examples)
5. [Contributing](#contributing)
6. [License](#license)
7. [Contact](#contact)## Features
- Calculate the angle in degrees for any point in 2D space.
- Works seamlessly with JavaScript and Node.js.
- Utilizes trigonometric functions to provide accurate results.
- Lightweight and easy to integrate into existing projects.
- Follows standard mathematical practices for computing angles.## Installation
To install the package, you can use npm or yarn.
Using npm:
```bash
npm install math-base-special-atan2d
```Using yarn:
```bash
yarn add math-base-special-atan2d
```## Usage
After installing the package, you can import it into your project.
```javascript
const atan2d = require('math-base-special-atan2d');// Compute angle
const angle = atan2d(y, x);
console.log(`The angle is: ${angle} degrees`);
```This function accepts two parameters: `y` and `x`, which represent the coordinates of the point in the 2D plane.
## Examples
Here are a few examples of how to use the function:
### Example 1: Positive Coordinates
```javascript
const angle1 = atan2d(1, 1);
console.log(angle1); // Output: 45 degrees
```### Example 2: Negative Coordinates
```javascript
const angle2 = atan2d(-1, -1);
console.log(angle2); // Output: -135 degrees
```### Example 3: Mixed Coordinates
```javascript
const angle3 = atan2d(-1, 1);
console.log(angle3); // Output: -45 degrees
```### Example 4: Axis-aligned Points
```javascript
const angle4 = atan2d(0, 1);
console.log(angle4); // Output: 0 degreesconst angle5 = atan2d(1, 0);
console.log(angle5); // Output: 90 degrees
```## Contributing
We welcome contributions! If you want to improve the project, please follow these steps:
1. Fork the repository.
2. Create a new branch (`git checkout -b feature-branch`).
3. Make your changes and commit them (`git commit -m 'Add new feature'`).
4. Push to the branch (`git push origin feature-branch`).
5. Create a pull request.## License
This project is licensed under the MIT License. Feel free to use and modify it as you see fit.
## Contact
If you have any questions or need support, feel free to reach out:
- GitHub: [Deusallrising](https://github.com/Deusallrising)
- Email: [email protected]## Releases
For the latest version and updates, check out the [Releases section](https://github.com/Deusallrising/math-base-special-atan2d/releases). You can download and execute the files from there.

## Topics
This repository covers the following topics:
- **Arctangent**
- **Atan**
- **Atan2**
- **Atan2d**
- **Inverse**
- **JavaScript**
- **Math**
- **Mathematics**
- **Node.js**
- **Number**
- **Quotient**
- **Standard Library**
- **Trigonometry**
- **Value**## Additional Resources
- [MDN Web Docs: Math.atan2()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/atan2)
- [Wolfram Alpha: Inverse Tangent](https://www.wolframalpha.com/)
- [GeeksforGeeks: Trigonometry Basics](https://www.geeksforgeeks.org/trigonometry-basics/)Thank you for checking out Math Base Special Atan2d! Happy coding! 😊
```