You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 12, 2023. It is now read-only.
var glob = 0;
class Vec
{
constructor(x: number, y: number)
{
this.x = x;
this.y = y;
if(glob == 1)
return;
glob = 1;
const a = this.scale(3);
this.x = a.x;
this.y = a.y;
}
public scale(s: number)
{
return new Vec(this.x*s, this.y*s);
}
private x: number;
private y: number;
}
const x = new Vec(3, 5);
console.log(x);
const y = new Vec(3, 5);
console.log(y);
javascript:
var glob = 0;
var Vec = /** @class */ (function () {
function Vec(x, y) {
this.x = x;
this.y = y;
if (glob == 1)
return;
glob = 1;
var a = this.scale(3);
this.x = a.x;
this.y = a.y;
}
Vec.prototype.scale = function (s) {
return new Vec(this.x * s, this.y * s);
};
return Vec;
}());
var x = new Vec(3, 5);
console.log(x);
var y = new Vec(3, 5);
console.log(y);
No description provided.
The text was updated successfully, but these errors were encountered: