From 2c8c193705a2e7b3e92f7ad0e43814683a3dcd20 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Tue, 18 Nov 2008 21:15:57 +0000 Subject: [PATCH] Tuple.create -> Tuple.newTuple. git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@782 c613c5cb-e716-0410-b11b-feb51c14d237 --- src/java/com/threerings/parlor/game/server/GameManager.java | 2 +- src/java/com/threerings/parlor/rating/util/Percentiler.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/java/com/threerings/parlor/game/server/GameManager.java b/src/java/com/threerings/parlor/game/server/GameManager.java index dcdda865..617d3106 100644 --- a/src/java/com/threerings/parlor/game/server/GameManager.java +++ b/src/java/com/threerings/parlor/game/server/GameManager.java @@ -408,7 +408,7 @@ public class GameManager extends PlaceManager if (_startmsgs == null) { _startmsgs = Lists.newArrayList(); } - _startmsgs.add(Tuple.create(msgbundle, msg)); + _startmsgs.add(Tuple.newTuple(msgbundle, msg)); return; } diff --git a/src/java/com/threerings/parlor/rating/util/Percentiler.java b/src/java/com/threerings/parlor/rating/util/Percentiler.java index 832dd370..1f65615a 100644 --- a/src/java/com/threerings/parlor/rating/util/Percentiler.java +++ b/src/java/com/threerings/parlor/rating/util/Percentiler.java @@ -146,7 +146,7 @@ public class Percentiler for (int ii = 0; ii < BUCKET_COUNT; ii++) { // determine the first new bucket that contains some or all of the old bucket float obot = _min + odelta * ii; - int newidx = (int)Math.floor((obot - newmin) / ndelta); + int newidx = Math.min(BUCKET_COUNT-1, (int)Math.floor((obot - newmin) / ndelta)); // compute how much of this bucket (if any) spills over into the next bucket float newoff = (float)Math.IEEEremainder(obot - newmin, ndelta);