mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-16 21:34:08 -07:00
19 lines
211 B
JavaScript
19 lines
211 B
JavaScript
|
|
import { circleArea } from "include/geometry/area.js";
|
||
|
|
|
||
|
|
class Circle
|
||
|
|
{
|
||
|
|
radius;
|
||
|
|
|
||
|
|
constructor(radius)
|
||
|
|
{
|
||
|
|
this.radius = radius;
|
||
|
|
}
|
||
|
|
|
||
|
|
get area()
|
||
|
|
{
|
||
|
|
return circleArea(this.radius);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
export default Circle;
|