@nemigo/helpers 2.0.0 → 2.0.1

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.
@@ -1,3 +1,4 @@
1
+ import type { Trigone } from "./types.js";
1
2
  /**
2
3
  * Приведение -0 и +0 к обычному 0
3
4
  *
@@ -46,6 +47,10 @@ export declare const toRadians: (degrees: number) => number;
46
47
  * Преобразует радианы в градусы
47
48
  */
48
49
  export declare const toDegrees: (radians: number) => number;
50
+ /**
51
+ * Преобразование радианов в {@link Trigone}
52
+ */
53
+ export declare const toTrigone: (radians: number) => Trigone;
49
54
  /**
50
55
  * Линейная интерполяция между двумя числами
51
56
  *
@@ -59,6 +59,10 @@ export const toRadians = (degrees) => (degrees * Math.PI) / 180;
59
59
  * Преобразует радианы в градусы
60
60
  */
61
61
  export const toDegrees = (radians) => (radians * 180) / Math.PI;
62
+ /**
63
+ * Преобразование радианов в {@link Trigone}
64
+ */
65
+ export const toTrigone = (radians) => [Math.sin(radians), Math.cos(radians)];
62
66
  //...
63
67
  /**
64
68
  * Линейная интерполяция между двумя числами
@@ -1,3 +1,8 @@
1
+ import type { Cortege } from "../types.js";
2
+ /**
3
+ * Тригонометрическое представление угла (синус и косинус)
4
+ */
5
+ export type Trigone = [sin: number, cos: number] | Cortege<2>;
1
6
  /**
2
7
  * Пространственные характеристики
3
8
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nemigo/helpers",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "private": false,
5
5
  "author": {
6
6
  "name": "Vlad Logvin",
@@ -9,9 +9,9 @@
9
9
  "type": "module",
10
10
  "scripts": {
11
11
  "build": "svelte-package && rimraf .svelte-kit",
12
- "check": "tsc --noemit",
13
- "eslint": "eslint ./",
14
- "eslint:fix": "eslint --fix ./",
12
+ "check": "bunx --bun tsc --noemit",
13
+ "eslint": "bunx --bun eslint ./",
14
+ "eslint:fix": "bunx --bun eslint --fix ./",
15
15
  "lint": "biome lint",
16
16
  "lint:fix": "biome lint --fix --unsafe",
17
17
  "lint:fix:unsafe": "biome lint --fix --unsafe",
@@ -208,7 +208,7 @@
208
208
  "@std/msgpack": "npm:@jsr/std__msgpack"
209
209
  },
210
210
  "devDependencies": {
211
- "@nemigo/configs": "2.0.0",
211
+ "@nemigo/configs": "2.1.1",
212
212
  "zod": "4.1.12"
213
213
  }
214
214
  }