Merge branch 'boat_boundarty_fix' into story36
# Conflicts: # mock/src/main/java/seng302/Model/Race.java Resolved.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user