mirror of
https://github.com/swc-project/swc.git
synced 2024-12-26 23:27:56 +03:00
790a262c07
swc_babel_ast: - Rename as `swc_estree_ast`. swc_babel_compat: - Rename as `swc_estree_compat`. swc_babel_visit: - Rename as `swc_estree_visit`.
16 lines
252 B
JavaScript
16 lines
252 B
JavaScript
class Point {
|
|
constructor(x, y) {
|
|
this.x = x;
|
|
this.y = y;
|
|
}
|
|
|
|
static displayName = "Point";
|
|
|
|
static distance(a, b) {
|
|
const dx = a.x - b.x;
|
|
const dy = a.y - b.y;
|
|
|
|
return Math.hypot(dx, dy);
|
|
}
|
|
}
|