Mercurial > hg > Members > tatsuki > Alice
changeset 277:ba4eea27d70d
Refactor to change attribute of threshold value to const class field.
author | kazz <kazz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 18 Oct 2013 01:55:21 +0900 |
parents | 3e0d1ac4f4a8 |
children | 04c769f00be1 |
files | src/alice/test/topology/aquarium/AutoIncrement.java |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/alice/test/topology/aquarium/AutoIncrement.java Fri Oct 18 01:51:15 2013 +0900 +++ b/src/alice/test/topology/aquarium/AutoIncrement.java Fri Oct 18 01:55:21 2013 +0900 @@ -8,7 +8,7 @@ private Receiver position = ids.create(CommandType.PEEK); private Receiver number = ids.create(CommandType.PEEK); - private float min = -1.3f; + private static final float MIN = -1.3f; public AutoIncrement(String key,int index){ this.number.setKey("maxsize"); @@ -20,8 +20,8 @@ float max = this.number.asInteger()*2-1+0.3f; FishPoint fp = this.position.asClass(FishPoint.class); if (fp.getX()+0.01>max){ - fp.setXYZ(min, fp.getY(), fp.getZ()); - } else if (fp.getX()+0.01< min){ + fp.setXYZ(MIN, fp.getY(), fp.getZ()); + } else if (fp.getX() + 0.01 < MIN){ fp.setXYZ(max, fp.getY(), fp.getZ()); } else {