It doesn't matter what type efficiency is, all that matters is that efficiency is between 0 and 1. This is also the message that the user wants to see: not that they used the wrong type, but that their input was out of bounds. This would also protect against someone accidentally passing 80.5, thinking they were passing 80.5%.
↧