Added first files
All checks were successful
CI / build (push) Successful in 22s

This commit is contained in:
Andrey Kernichniy 2026-03-03 22:22:28 +07:00
parent 4b971ea4eb
commit 12f837d316
11 changed files with 314 additions and 1 deletions

View file

@ -0,0 +1 @@
export const degToRad = (deg: number) => (deg * Math.PI) / 180;

View file

@ -0,0 +1,3 @@
export * from "./functions";
export * from "./interfaces";
export * from "./models";

View file

@ -0,0 +1,9 @@
export interface ISize {
width: number;
height: number;
}
export interface IPoint {
x: number;
y: number;
}

3
lib/src/models/index.ts Normal file
View file

@ -0,0 +1,3 @@
export * from "./margin";
export * from "./point";
export * from "./size";

13
lib/src/models/margin.ts Normal file
View file

@ -0,0 +1,13 @@
export class Margin {
top: number;
left: number;
bottom: number;
right: number;
constructor(top: number, left: number, bottom: number, right: number) {
this.top = top;
this.left = left;
this.bottom = bottom;
this.right = right;
}
}

8
lib/src/models/point.ts Normal file
View file

@ -0,0 +1,8 @@
import { IPoint } from "../interfaces";
export class Point implements IPoint {
constructor(
public x = 0,
public y = 0,
) {}
}

8
lib/src/models/size.ts Normal file
View file

@ -0,0 +1,8 @@
import { ISize } from "../interfaces";
export class Size implements ISize {
constructor(
public width = 0,
public height = 0,
) {}
}

View file

@ -1,5 +1,5 @@
{
"name": "@gxc-solutions/lib",
"name": "@gxc-solutions/gxc-math",
"version": "0.0.1",
"main": "index.js",
"author": "GXC Solutions",