Code: Select all
Class Point {
__New(x, y) {
this.x := x, this.y := y
}
==(p) {
return (p.x == this.x and p.y == this.y)
}
-(p) {
return new Point(this.x - p.x, this.y - p.y)
}
}
P1 := new Point(150, 150)
P2 := new Point(200, 100)
P3 := P1 - P2
MsgBox, % P3.x . " " . P3.y