mirror of
https://github.com/bspeice/speice.io
synced 2024-12-23 00:58:09 -05:00
10 lines
155 B
TypeScript
10 lines
155 B
TypeScript
export function camera(
|
|
x: number,
|
|
y: number,
|
|
size: number
|
|
): [number, number] {
|
|
return [
|
|
Math.floor(x * size),
|
|
Math.floor(y * size)
|
|
];
|
|
} |