Compare variables and return the highest value (Sugarcube)?

Twine Version: 2.3.14
Story Format: Sugarcube

Hi, is there a handy macro to return the highest value from a list of variables in Sugarcube? I’ve found this example for Harlowe, I basically need to do the same in Sugarcube:

(max: $compliment, $insult, $something, $anotherthing)

Assuming we’re talking about numbers, Math.max().

Math.max($compliment, $insult, $something, $anotherthing)

It took me a while to figure out I needed to create a new variable and assign it to the result! But then it worked. Many thanks amigo.