mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-19 11:40:24 +08:00
29 lines
935 B
TypeScript
29 lines
935 B
TypeScript
declare module "vec3"{
|
|
export class Vec3{
|
|
constructor(x: number, y: number, z: number);
|
|
constructor(location: number[]);
|
|
constructor(location: {x: number; y: number; z: number});
|
|
constructor(locationStr: string);
|
|
|
|
set(x, y, z): Vec3;
|
|
update(other: Vec3): Vec3;
|
|
floored(): Vec3;
|
|
floor(): Vec3;
|
|
offset(dx: number, dy: number, dz: number): Vec3;
|
|
translate(dx: number, dy: number, dz: number): Vec3;
|
|
add(other: Vec3): Vec3;
|
|
substract(other: Vec3): Vec3;
|
|
plus(other: Vec3): Vec3;
|
|
minus(other: Vec3): Vec3;
|
|
scaled(scalar: number): Vec3;
|
|
abs(): Vec3
|
|
volume(): number;
|
|
modulus(): Vec3;
|
|
distanceTo(other: Vec3): number;
|
|
equals(other: Vec3): boolean;
|
|
toString(): string;
|
|
clone(): Vec3;
|
|
min(other: Vec3): Vec3;
|
|
max(other: Vec3): Vec3;
|
|
}
|
|
} |