nitro-renderer/packages/utils/src/PointMath.ts

20 lines
444 B
TypeScript
Raw Normal View History

2024-03-20 02:53:17 +01:00
import { Point } from 'pixi.js';
2021-03-17 03:02:09 +01:00
export class PointMath
{
public static sum(k: Point, _arg_2: Point): Point
{
return new Point((k.x + _arg_2.x), (k.y + _arg_2.y));
}
2021-05-09 01:29:07 +02:00
public static sub(k: Point, _arg_2: Point): Point
2021-03-17 03:02:09 +01:00
{
return new Point((k.x - _arg_2.x), (k.y - _arg_2.y));
}
2021-05-09 01:29:07 +02:00
public static mul(k: Point, _arg_2: number): Point
2021-03-17 03:02:09 +01:00
{
return new Point((k.x * _arg_2), (k.y * _arg_2));
}
2021-05-09 01:29:07 +02:00
}