feat: Add default values to vector constructor

This commit is contained in:
Eugene 2024-08-14 18:11:40 +03:00
parent e41f00e3d6
commit ae3a1f9608
1 changed files with 1 additions and 1 deletions

View File

@ -7,7 +7,7 @@ export class Vector2D {
* @param {number} x - The x-coordinate.
* @param {number} y - The y-coordinate.
*/
constructor(x: number, y: number) {
constructor(x: number = 0, y: number = 0) {
this.x = x;
this.y = y;
}