@febin52/degrees-radians-fast 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1 @@
1
+ MIT License
package/README.md ADDED
@@ -0,0 +1,24 @@
1
+ # 📐 @febin52/degrees-radians-fast
2
+
3
+ > High-speed degrees to radians and radians to degrees conversion.
4
+
5
+ [![npm version](https://img.shields.io/npm/v/@febin52/degrees-radians-fast.svg)](https://www.npmjs.com/package/@febin52/degrees-radians-fast)
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm install @febin52/degrees-radians-fast
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ ```typescript
16
+ import { toRadians, toDegrees } from '@febin52/degrees-radians-fast';
17
+
18
+ toDegrees(Math.PI); // 180
19
+ toRadians(180); // 3.141592653589793
20
+ ```
21
+
22
+ ## License
23
+
24
+ MIT © Febin Francis
package/dist/index.cjs ADDED
@@ -0,0 +1 @@
1
+ (function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.Pkg={}))})(this,function(e){"use strict";function t(n){return n*(Math.PI/180)}function i(n){return n*(180/Math.PI)}e.toDegrees=i,e.toRadians=t,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
@@ -0,0 +1,5 @@
1
+ export declare function toDegrees(rad: number): number;
2
+
3
+ export declare function toRadians(deg: number): number;
4
+
5
+ export { }
package/dist/index.js ADDED
@@ -0,0 +1,10 @@
1
+ function n(t) {
2
+ return t * (Math.PI / 180);
3
+ }
4
+ function e(t) {
5
+ return t * (180 / Math.PI);
6
+ }
7
+ export {
8
+ e as toDegrees,
9
+ n as toRadians
10
+ };
package/package.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "@febin52/degrees-radians-fast",
3
+ "version": "1.0.0",
4
+ "description": "High-speed degrees to radians & radians to degrees conversion.",
5
+ "main": "./dist/index.cjs",
6
+ "module": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js",
12
+ "require": "./dist/index.cjs"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist",
17
+ "README.md",
18
+ "LICENSE"
19
+ ],
20
+ "scripts": {
21
+ "build": "tsc && vite build",
22
+ "test": "vitest run"
23
+ },
24
+ "keywords": [
25
+ "degrees",
26
+ "radians",
27
+ "trigonometry",
28
+ "math",
29
+ "angle",
30
+ "convert"
31
+ ],
32
+ "author": "Febin Francis",
33
+ "license": "MIT",
34
+ "repository": {
35
+ "type": "git",
36
+ "url": "git+https://github.com/febin52/degrees-radians-fast.git"
37
+ },
38
+ "bugs": {
39
+ "url": "https://github.com/febin52/degrees-radians-fast/issues"
40
+ },
41
+ "homepage": "https://github.com/febin52/degrees-radians-fast#readme"
42
+ }