ð§ Question time
This commit is contained in:
parent
38ccf65789
commit
20eafd4a99
17 changed files with 123 additions and 44 deletions
13
lib/point.ts
Normal file
13
lib/point.ts
Normal file
|
@ -0,0 +1,13 @@
|
|||
const PRECISION = 2;
|
||||
|
||||
export default class Point {
|
||||
x: number;
|
||||
y: number;
|
||||
|
||||
constructor(x: number, y: number) {
|
||||
this.x = +x.toFixed(PRECISION);
|
||||
this.y = +y.toFixed(PRECISION);
|
||||
|
||||
return this;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue