From: Bill Kuker Date: Wed, 22 Apr 2009 19:56:39 +0000 (+0000) Subject: Made perimeter take a shape, not just an area X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=586e790d746374722c4f04d9d8361f72450a6a95;p=sw%2Fmotorsim Made perimeter take a shape, not just an area --- diff --git a/src/com/billkuker/rocketry/motorsim/grain/ShapeUtil.java b/src/com/billkuker/rocketry/motorsim/grain/ShapeUtil.java index 531d833..5dbb1ec 100644 --- a/src/com/billkuker/rocketry/motorsim/grain/ShapeUtil.java +++ b/src/com/billkuker/rocketry/motorsim/grain/ShapeUtil.java @@ -75,7 +75,7 @@ public class ShapeUtil { return Amount.valueOf(area, SI.MILLIMETER.pow(2)).to(Area.UNIT); } - public static Amount perimeter(java.awt.geom.Area a) { + public static Amount perimeter(Shape a) { //TODO: I think I need to handle seg_close!! PathIterator i = a.getPathIterator(new AffineTransform(), .001); double x = 0, y = 0;