-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parking capacities #41
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM,
i left a few minor comments
minCapacity = usableLength /50; | ||
} | ||
|
||
l.getAttributes().putAttribute("maxParkingCapacity", Math.floor(maxCapacity)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it intended to write the capacity as double? Did you consider an integer?
|
||
l.getAttributes().putAttribute("maxParkingCapacity", Math.floor(maxCapacity)); | ||
l.getAttributes().putAttribute("minParkingCapacity", Math.floor(minCapacity)); | ||
listOfParkingCapacities.add(new ParkingCapacityRecord(l.getId().toString(), (int) Math.floor(maxCapacity), (int) Math.floor(minCapacity))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would recommend to do the cast and the computation further above, when you set the values for maxCapacity
and minCapacity
, i.e. in lines 33 and 34, respectively. You'd have to convert their types to int then. This will then need fewer calls of Math.floor()
and also would be more clean and intuitive (to me).
please consider squashing the commits when merging ;) |
No description provided.