export default class Point { readonly x : number ; readonly z : number ; constructor ( x , z ) { this . x = x ; this . z = z ; } offset ( x , z ) { return new Point ( this . x + x , this . z + z ) ; } round ( ) { return new Point ( Math . round ( this . x ) , Math . round ( this . z ) ) ; } distance ( p1 ) { return Math . sqrt ( Math . pow ( p1 . x - this . x , 2 ) + Math . pow ( p1 . z - this . z , 2 ) ) ; } }