PDA

View Full Version : Xpresso: How to make a number positive?


mogh
06-24-2007, 11:13 AM
Hi folks

I often have a resulting number in Xpresso which is minus (-4000, whatever)
i normaly aply a math function with multiplicating by -1 to get a positive number.

But thats only usefull if the actuall result is negative, when its positive it just gets negative ...

Is there a way to "convert" a "unknown" number into a positive value?

hope i could make my problem clear with my limited germanenglish ;-)

thanks in advance
mogh

robotbob
06-24-2007, 11:14 AM
use the NEGATE node

p

Srek
06-24-2007, 11:43 AM
Use the absolut node
Cheers
Björn

robotbob
06-24-2007, 12:06 PM
in case you are confused by two answers shrek is correct considering you requested positive values.

the negate node will also produce a positive number - but if your input number ever happens to be positive the negate node will then generate a negative number as a result.

so absolute always flips it +ve & negate will flip it either way

p

mogh
06-24-2007, 12:17 PM
yes, (absulute) i just tested it myself to clear the haze ...

by the way the Absolute note is not easy to find in the help because its name is shortened by a unknown reason

Abs Operator

but thanks to both of you for the fast answers ...

happy sunday.
cu

manuel
06-24-2007, 02:02 PM
If you're writing an expression in, say, a Formula-node, you can always use:

abs(your formula)

whatever the outcome of your formula, "abs" will assure that the result is positive.

CGTalk Moderation
06-24-2007, 02:02 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.