feat: Add default values to vector constructor
This commit is contained in:
parent
e41f00e3d6
commit
ae3a1f9608
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue