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

20 lines
447 B
TypeScript
Raw Normal View History

2023-07-19 22:28:51 +02:00
import { Point } from '@pixi/core';
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
}