How to Add Absolute Value in Graphical Version?

Hello,

RobotC has a an absolute value function, which is perfect because I don’t have to care if a sensor gets a positive or negative value, just get the ABS value and compare if it has moved the instructed distance, but I don’t seem to find a way of accomplinshing that on the graphical version.

How can I get abs(SensorValue) or abs(GetMotorEncoder) inside an if, while, or waituntil in the graphical version?

It’s tough to do in graphical, here is one way using variable assignment, just type the “abs” expression as the new assigned value, you can actually combine lines 3 and 4 if you want.