@@ -0,0 +1,611 @@
+package com.github.davidmoten.rtree;%0A%0Apublic class Circle implements Geometry %7B%0A%0A%09private final float x, y, radius;%0A%09private final Rectangle mbr;%0A%0A%09public Circle(float x, float y, float radius) %7B%0A%09%09this.x = x;%0A%09%09this.y = y;%0A%09%09this.radius = radius;%0A%09%09this.mbr = Rectangle.create(x - radius, y - radius, x + radius, y%0A%09%09%09%09+ radius);%0A%09%7D%0A%0A%09@Override%0A%09public Rectangle mbr() %7B%0A%09%09return mbr;%0A%09%7D%0A%0A%09@Override%0A%09public double distance(Rectangle r) %7B%0A%09%09return Math.max(0, new Point(x, y).distance(r) - radius);%0A%09%7D%0A%0A%09@Override%0A%09public boolean intersects(Rectangle r) %7B%0A%09%09return new Point(x, y).distance(r) %3C= radius;%0A%09%7D%0A%0A%7D%0A

add Circle geometry