Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Can someone explain the math happening in the if statement?
Why are we multiplying (g*3600) and dividing it by the difference of two speeds?
What does this represent?
Yes, but with meaningful method and parameter names like
race
,v1
,v2
andg
and no tests covering int overflows I personally wouldn't expect foolproof solutions here. ;-)Will it overflow if g is very large?