@ntf/math 1.3.0 → 1.3.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.
- package/dist/index.d.mts +19 -3
- package/dist/{index.d.cts → index.d.ts} +19 -3
- package/dist/{index.cjs → index.js} +600 -244
- package/dist/index.mjs +578 -198
- package/package.json +13 -10
package/dist/index.d.mts
CHANGED
|
@@ -260,6 +260,22 @@ declare const FNV1_OFFSET = 14695981039346656037n;
|
|
|
260
260
|
declare const FNV1_PRIME = 1099511628211n;
|
|
261
261
|
declare function fnv1<V>(value: V): bigint;
|
|
262
262
|
declare function sdbm<V>(value: V): bigint;
|
|
263
|
+
interface IHash {
|
|
264
|
+
update(input: Uint8Array): this;
|
|
265
|
+
digest(): Uint8Array;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
declare class MD2 implements IHash {
|
|
269
|
+
static readonly BLOCK_SIZE = 16;
|
|
270
|
+
private _data;
|
|
271
|
+
private _state;
|
|
272
|
+
private _checksum;
|
|
273
|
+
private _length;
|
|
274
|
+
constructor();
|
|
275
|
+
update(input: Uint8Array): this;
|
|
276
|
+
private _transform;
|
|
277
|
+
digest(): Uint8Array;
|
|
278
|
+
}
|
|
263
279
|
|
|
264
280
|
declare const MAX_ANGLE_DEGREE = 360;
|
|
265
281
|
declare const cap_angle_degree: (angle: number) => number;
|
|
@@ -536,8 +552,8 @@ declare class Mat3 implements IMat3 {
|
|
|
536
552
|
toString(): Mat3String;
|
|
537
553
|
clone(): Mat3;
|
|
538
554
|
equals(mat: Mat3Like): boolean;
|
|
539
|
-
add(mat: Mat3Like):
|
|
540
|
-
subtract(mat: Mat3Like):
|
|
555
|
+
add(mat: Mat3Like): Mat3;
|
|
556
|
+
subtract(mat: Mat3Like): Mat3;
|
|
541
557
|
multiply(mat: Mat3Like): Mat3;
|
|
542
558
|
multiply(scalar: number): Mat3;
|
|
543
559
|
translate(x: number, y: number): Mat3;
|
|
@@ -735,4 +751,4 @@ declare function clamp<T extends number | bigint>(value: T, min: T, max: T): T;
|
|
|
735
751
|
declare function log_hypot(a: number, b: number): number;
|
|
736
752
|
declare const EPSILON = 1e-16;
|
|
737
753
|
|
|
738
|
-
export { ATriangle, type AnyColor, type AnyColorArray, type AnyColorLike, type AnyColorString, type AnyHSLArray, type AnyHSLLike, type AnyHSLString, type AnyRGBArray, type AnyRGBLike, type AnyRGBString, BoundingBox, type BoundingBoxArray, type BoundingBoxLike, type BoundingBoxString, Circle, type CircleArray, type CircleLike, type CircleString, DJB2_OFFSET, EPSILON, FNV1_OFFSET, FNV1_PRIME, type HSLAArray, type HSLALike, type HSLAString, type HSLArray, HSLColor, type HSLLike, type HSLString, type HexDigit, type HexLike, type IAnyHSL, type IAnyRGB, type IBoundingBox, type ICircle, type IColor, type IGeometryObject, type IHSL, type IHSLA, type IMat3, type IMat4, type IQuaternion, type IRBBA, type IRGB, type IRectangle, type ISize, type IToString, type ITriangle, type IVec2, type IVec3, type JavaScriptTypeMap, type JavaScriptTypes, LinearFunction, type LinearFunctionString, MAX_ANGLE_DEGREE, Mat3, type Mat3Array, type Mat3Like, type Mat3NestedArray, type Mat3String, Mat4, type Mat4Array, type Mat4Like, type Mat4NestedArray, type Mat4String, MathFunction, type Predicate, QuadFunction, type QuadFunctionString, type QuadFunctionStrings, type QuadFunctionType, Quaternion, type QuaternionArray, type QuaternionLike, type QuaternionString, type RGBAArray, RGBAColor, type RGBALike, type RGBAString, type RGBArray, type RGBLike, type RGBString, Rectangle, type RectangleArray, type RectangleLike, type RectangleString, ResolveError, Size, type SizeArguments, type SizeArray, type SizeLike, type SizeString, Transform, Triangle2D, Triangle3D, Vec2, type Vec2Arguments, type Vec2Array, type Vec2Like, type Vec2String, Vec3, type Vec3Arguments, type Vec3Array, type Vec3Like, type Vec3String, cap_angle_degree, cap_angle_radian, castColor, check_array, check_hex, check_hex_digit, check_number, check_number_array, check_string, check_string_array, clamp, degree_to_radian, djb2, fnv1, get_hex_part, has_property, log_hypot, radian_to_degree, resolveColor, sdbm, sign_char, stringify };
|
|
754
|
+
export { ATriangle, type AnyColor, type AnyColorArray, type AnyColorLike, type AnyColorString, type AnyHSLArray, type AnyHSLLike, type AnyHSLString, type AnyRGBArray, type AnyRGBLike, type AnyRGBString, BoundingBox, type BoundingBoxArray, type BoundingBoxLike, type BoundingBoxString, Circle, type CircleArray, type CircleLike, type CircleString, DJB2_OFFSET, EPSILON, FNV1_OFFSET, FNV1_PRIME, type HSLAArray, type HSLALike, type HSLAString, type HSLArray, HSLColor, type HSLLike, type HSLString, type HexDigit, type HexLike, type IAnyHSL, type IAnyRGB, type IBoundingBox, type ICircle, type IColor, type IGeometryObject, type IHSL, type IHSLA, type IHash, type IMat3, type IMat4, type IQuaternion, type IRBBA, type IRGB, type IRectangle, type ISize, type IToString, type ITriangle, type IVec2, type IVec3, type JavaScriptTypeMap, type JavaScriptTypes, LinearFunction, type LinearFunctionString, MAX_ANGLE_DEGREE, MD2, Mat3, type Mat3Array, type Mat3Like, type Mat3NestedArray, type Mat3String, Mat4, type Mat4Array, type Mat4Like, type Mat4NestedArray, type Mat4String, MathFunction, type Predicate, QuadFunction, type QuadFunctionString, type QuadFunctionStrings, type QuadFunctionType, Quaternion, type QuaternionArray, type QuaternionLike, type QuaternionString, type RGBAArray, RGBAColor, type RGBALike, type RGBAString, type RGBArray, type RGBLike, type RGBString, Rectangle, type RectangleArray, type RectangleLike, type RectangleString, ResolveError, Size, type SizeArguments, type SizeArray, type SizeLike, type SizeString, Transform, Triangle2D, Triangle3D, Vec2, type Vec2Arguments, type Vec2Array, type Vec2Like, type Vec2String, Vec3, type Vec3Arguments, type Vec3Array, type Vec3Like, type Vec3String, cap_angle_degree, cap_angle_radian, castColor, check_array, check_hex, check_hex_digit, check_number, check_number_array, check_string, check_string_array, clamp, degree_to_radian, djb2, fnv1, get_hex_part, has_property, log_hypot, radian_to_degree, resolveColor, sdbm, sign_char, stringify };
|
|
@@ -260,6 +260,22 @@ declare const FNV1_OFFSET = 14695981039346656037n;
|
|
|
260
260
|
declare const FNV1_PRIME = 1099511628211n;
|
|
261
261
|
declare function fnv1<V>(value: V): bigint;
|
|
262
262
|
declare function sdbm<V>(value: V): bigint;
|
|
263
|
+
interface IHash {
|
|
264
|
+
update(input: Uint8Array): this;
|
|
265
|
+
digest(): Uint8Array;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
declare class MD2 implements IHash {
|
|
269
|
+
static readonly BLOCK_SIZE = 16;
|
|
270
|
+
private _data;
|
|
271
|
+
private _state;
|
|
272
|
+
private _checksum;
|
|
273
|
+
private _length;
|
|
274
|
+
constructor();
|
|
275
|
+
update(input: Uint8Array): this;
|
|
276
|
+
private _transform;
|
|
277
|
+
digest(): Uint8Array;
|
|
278
|
+
}
|
|
263
279
|
|
|
264
280
|
declare const MAX_ANGLE_DEGREE = 360;
|
|
265
281
|
declare const cap_angle_degree: (angle: number) => number;
|
|
@@ -536,8 +552,8 @@ declare class Mat3 implements IMat3 {
|
|
|
536
552
|
toString(): Mat3String;
|
|
537
553
|
clone(): Mat3;
|
|
538
554
|
equals(mat: Mat3Like): boolean;
|
|
539
|
-
add(mat: Mat3Like):
|
|
540
|
-
subtract(mat: Mat3Like):
|
|
555
|
+
add(mat: Mat3Like): Mat3;
|
|
556
|
+
subtract(mat: Mat3Like): Mat3;
|
|
541
557
|
multiply(mat: Mat3Like): Mat3;
|
|
542
558
|
multiply(scalar: number): Mat3;
|
|
543
559
|
translate(x: number, y: number): Mat3;
|
|
@@ -735,4 +751,4 @@ declare function clamp<T extends number | bigint>(value: T, min: T, max: T): T;
|
|
|
735
751
|
declare function log_hypot(a: number, b: number): number;
|
|
736
752
|
declare const EPSILON = 1e-16;
|
|
737
753
|
|
|
738
|
-
export { ATriangle, type AnyColor, type AnyColorArray, type AnyColorLike, type AnyColorString, type AnyHSLArray, type AnyHSLLike, type AnyHSLString, type AnyRGBArray, type AnyRGBLike, type AnyRGBString, BoundingBox, type BoundingBoxArray, type BoundingBoxLike, type BoundingBoxString, Circle, type CircleArray, type CircleLike, type CircleString, DJB2_OFFSET, EPSILON, FNV1_OFFSET, FNV1_PRIME, type HSLAArray, type HSLALike, type HSLAString, type HSLArray, HSLColor, type HSLLike, type HSLString, type HexDigit, type HexLike, type IAnyHSL, type IAnyRGB, type IBoundingBox, type ICircle, type IColor, type IGeometryObject, type IHSL, type IHSLA, type IMat3, type IMat4, type IQuaternion, type IRBBA, type IRGB, type IRectangle, type ISize, type IToString, type ITriangle, type IVec2, type IVec3, type JavaScriptTypeMap, type JavaScriptTypes, LinearFunction, type LinearFunctionString, MAX_ANGLE_DEGREE, Mat3, type Mat3Array, type Mat3Like, type Mat3NestedArray, type Mat3String, Mat4, type Mat4Array, type Mat4Like, type Mat4NestedArray, type Mat4String, MathFunction, type Predicate, QuadFunction, type QuadFunctionString, type QuadFunctionStrings, type QuadFunctionType, Quaternion, type QuaternionArray, type QuaternionLike, type QuaternionString, type RGBAArray, RGBAColor, type RGBALike, type RGBAString, type RGBArray, type RGBLike, type RGBString, Rectangle, type RectangleArray, type RectangleLike, type RectangleString, ResolveError, Size, type SizeArguments, type SizeArray, type SizeLike, type SizeString, Transform, Triangle2D, Triangle3D, Vec2, type Vec2Arguments, type Vec2Array, type Vec2Like, type Vec2String, Vec3, type Vec3Arguments, type Vec3Array, type Vec3Like, type Vec3String, cap_angle_degree, cap_angle_radian, castColor, check_array, check_hex, check_hex_digit, check_number, check_number_array, check_string, check_string_array, clamp, degree_to_radian, djb2, fnv1, get_hex_part, has_property, log_hypot, radian_to_degree, resolveColor, sdbm, sign_char, stringify };
|
|
754
|
+
export { ATriangle, type AnyColor, type AnyColorArray, type AnyColorLike, type AnyColorString, type AnyHSLArray, type AnyHSLLike, type AnyHSLString, type AnyRGBArray, type AnyRGBLike, type AnyRGBString, BoundingBox, type BoundingBoxArray, type BoundingBoxLike, type BoundingBoxString, Circle, type CircleArray, type CircleLike, type CircleString, DJB2_OFFSET, EPSILON, FNV1_OFFSET, FNV1_PRIME, type HSLAArray, type HSLALike, type HSLAString, type HSLArray, HSLColor, type HSLLike, type HSLString, type HexDigit, type HexLike, type IAnyHSL, type IAnyRGB, type IBoundingBox, type ICircle, type IColor, type IGeometryObject, type IHSL, type IHSLA, type IHash, type IMat3, type IMat4, type IQuaternion, type IRBBA, type IRGB, type IRectangle, type ISize, type IToString, type ITriangle, type IVec2, type IVec3, type JavaScriptTypeMap, type JavaScriptTypes, LinearFunction, type LinearFunctionString, MAX_ANGLE_DEGREE, MD2, Mat3, type Mat3Array, type Mat3Like, type Mat3NestedArray, type Mat3String, Mat4, type Mat4Array, type Mat4Like, type Mat4NestedArray, type Mat4String, MathFunction, type Predicate, QuadFunction, type QuadFunctionString, type QuadFunctionStrings, type QuadFunctionType, Quaternion, type QuaternionArray, type QuaternionLike, type QuaternionString, type RGBAArray, RGBAColor, type RGBALike, type RGBAString, type RGBArray, type RGBLike, type RGBString, Rectangle, type RectangleArray, type RectangleLike, type RectangleString, ResolveError, Size, type SizeArguments, type SizeArray, type SizeLike, type SizeString, Transform, Triangle2D, Triangle3D, Vec2, type Vec2Arguments, type Vec2Array, type Vec2Like, type Vec2String, Vec3, type Vec3Arguments, type Vec3Array, type Vec3Like, type Vec3String, cap_angle_degree, cap_angle_radian, castColor, check_array, check_hex, check_hex_digit, check_number, check_number_array, check_string, check_string_array, clamp, degree_to_radian, djb2, fnv1, get_hex_part, has_property, log_hypot, radian_to_degree, resolveColor, sdbm, sign_char, stringify };
|