2025-10-24 11:38:51 +00:00
|
|
|
using System;
|
2024-09-14 06:41:52 +00:00
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using Godot;
|
|
|
|
|
|
|
|
|
|
namespace Rokojori
|
|
|
|
|
{
|
|
|
|
|
public class Circle
|
|
|
|
|
{
|
|
|
|
|
public Vector2 center = Vector2.Zero;
|
|
|
|
|
public float radius = 1;
|
2025-10-24 11:38:51 +00:00
|
|
|
|
|
|
|
|
public static Circle WithRadius( float radius = 1f )
|
|
|
|
|
{
|
|
|
|
|
var c = new Circle();
|
|
|
|
|
c.radius = radius;
|
|
|
|
|
return c;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public float circumference => radius * Mathf.Pi * 2;
|
|
|
|
|
public float area => Mathf.Pi * radius * radius;
|
2024-09-14 06:41:52 +00:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|