I feel like a total idiot right now, checking algebra wikis and shit to make sure I am not insane, but isn't that inequality wrong? Wouldn't the listed formula's value need to be less than the radius SQUARED? Or:
w * sqrt(2) / 2 < r?
If you look at the implementations, they didn't include that it's the square root of the formula that must be less than or equal to the radius in the initial math overview, but did it right in the code.
3 comments
[ 3.5 ms ] story [ 20.4 ms ] threadAlso, would a Java programmer really reach for that pattern first for this example?