Both your lowerClampedValue and your clampedValue are functions. When you return clampedValue you are returning the function. These should both be variables assigned the values returned by Math.max() and Math.min().
Should look more like this:
aah, thank you. I get so confused on how or what form of function to use. It seems like there’s a lot of different ways to write functions depending on where they’re placed and such. I thought the form I was using saved the return value to the variable but I guess the whole function is being saved to it. It did seem odd using two sets of the same parameters. thanks for clearing that up for me.