I'm not sure why Pythagorean's Theorem would be necessary here. Plus, in order for this scaling idea to be flexible, it would be best to allow programmers to change the settings. So:
Scale = ax+b
ScaleDeterminant = 14a+b (largest value)
ScaleFactor = (100*Scale)/ScaleDeterminant
Then, just multiply your cel height and cel width by this scaling factor, divide by 100 and you'd get out your maximum scale size. Plus, you could even derive two equations: one for horizontal scale, the other for vertical scale (and also, this allows for a much more generalized usage, and not dependant on movement or priorities.) Even better, you could adjust the values so that the middle of the screen is "normal sized" (ie: ScaleDeterminant=7a+b). However, just how something like this would actually be implemented in SCI0 or SCI01 I don't know. I don't remember seeing a way to scale views.