generated from gxc-solutions/gxc-template-repo
This commit is contained in:
parent
4b971ea4eb
commit
12f837d316
11 changed files with 314 additions and 1 deletions
1
lib/src/functions/index.ts
Normal file
1
lib/src/functions/index.ts
Normal file
|
|
@ -0,0 +1 @@
|
|||
export const degToRad = (deg: number) => (deg * Math.PI) / 180;
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
export * from "./functions";
|
||||
export * from "./interfaces";
|
||||
export * from "./models";
|
||||
|
|
@ -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
3
lib/src/models/index.ts
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
export * from "./margin";
|
||||
export * from "./point";
|
||||
export * from "./size";
|
||||
13
lib/src/models/margin.ts
Normal file
13
lib/src/models/margin.ts
Normal 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
8
lib/src/models/point.ts
Normal 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
8
lib/src/models/size.ts
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import { ISize } from "../interfaces";
|
||||
|
||||
export class Size implements ISize {
|
||||
constructor(
|
||||
public width = 0,
|
||||
public height = 0,
|
||||
) {}
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "@gxc-solutions/lib",
|
||||
"name": "@gxc-solutions/gxc-math",
|
||||
"version": "0.0.1",
|
||||
"main": "index.js",
|
||||
"author": "GXC Solutions",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue