It's defined under line 29, and it takes all the various ranges into account. Check line 86.