Added defs for maximums based on scale values to be used in place of max
calcs in C functions