Replace an incorrect math.max() by math.min() in tileclass
Summary: Patch by smiley fixing rP21026
Test Plan:
Check that is the correct fix.
Measure how badly it affected performance.
Reviewers: O14 Maps, elexis, Stan
Reviewed By: O14 Maps, elexis
Subscribers: smiley
Trac Tickets: #4992
Differential Revision: https://code.wildfiregames.com/D2010