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.
I automatically used the Math.floor function when I didn't need to as casting to int just disgarded everythign after the decimal point, so it was easy, but I did learn/realize something in the solutions.
Talk about similar styles! :)
I wonder what the performance of an EnumMap is...
I think this is a really interesting solution & I learned something from it. But I'd have to disagree with the best practive votes. There's no doubt it's clever, very clever, but in terms of maintainability it's difficult to understand at a glance and my benchmark gave 80ms against <1ms for the simple & easily readable switch solution.
Very nice!