Max

From Fancade Wiki
Revision as of 16:09, 3 July 2024 by -u ndefined- (talk | contribs) (Adapt "Can I avoid using IF for X greater than Y" article from old wiki)
Max
Max.png
TypeScript block
ColliderNone
FolderMath
Ports
Inputs Num1
Num2
Outputs Bigger Num

Outputs the bigger number.

The maximum of 3 and 5 is 5. The maximum of -2 and 0 is 0.

Notes

If one of the inputs are nan, the other value will be outputted regardless.

This can be used in conjunction with Divide to check if a number is greater than another, without using If:

Greater than no if.png

Related