KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
In java when you do a % b If a is negative, it will return a negative result, instead of wrapping around to b like it should. What's the best way to fix this? Only way I can think is a < 0 ? b + a : a % b
Tags (comma-separated)
Save Edits
Cancel