Merge branch 'boat_boundarty_fix' into story36

# Conflicts:
#	mock/src/main/java/seng302/Model/Race.java
Resolved.
This commit is contained in:
fjc40
2017-05-23 18:35:39 +12:00
parent 9076606030
commit 824a5ed3a2
5 changed files with 254 additions and 21 deletions
@@ -227,7 +227,7 @@ public class BoatLocation extends AC35Data {
*/
public static int convertHeadingDoubleToInt(double heading) {
int headingInt = (int) ((heading / 360.0) * 65536.0);
int headingInt = (int) ((heading * 65536.0) / 360.0);
return headingInt;
}
@@ -18,7 +18,7 @@ public class RaceStatus extends AC35Data {
private int windSpeed;
private int raceType;
private List<BoatStatus> boatStatuses;
private static final double windDirectionScalar = 360.0 / 32768.0; // 0x8000 / 360
private static final double windDirectionScalar = 360.0 / 65536.0; // 0x8000 / 360
public RaceStatus(long currentTime, int raceID, int raceStatus, long expectedStartTime, int windDirection, int windSpeed, int raceType, List<BoatStatus> boatStatuses){
super(MessageType.RACESTATUS);