Make Number Negative

2007-06-13 Thread Robert Rawlins - Think Blue
Chaps, I'm looking for the best way to make a positive number into a negative one, so if I have '10' I'm looking to convert that to '-10' what's the best way to achieve this? Thanks, Rob ~| ColdFusion MX7 and Flex 2

RE: Make Number Negative

2007-06-13 Thread Peterson, Chris
Multiply by -1 =) Chris ~| ColdFusion 8 beta – Build next generation applications today. Free beta download on Labs http://www.adobe.com/cfusion/entitlement/index.cfm?e=labs_adobecf8_beta Archive:

Re: Make Number Negative

2007-06-13 Thread Tom Chiverton
On Wednesday 13 Jun 2007, Robert Rawlins - Think Blue wrote: I'm looking for the best way to make a positive number into a negative one, so if I have '10' I'm looking to convert that to '-10' what's the best way to achieve this? Subtract itself twice. -- Tom Chiverton Helping to

Re: Make Number Negative

2007-06-13 Thread Jake Pilgrim
0 minus your number works too. To ensure a negative number, use abs(): cfset var1 = 0 - abs(numVar) / Jake ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs

RE: Make Number Negative

2007-06-13 Thread Bobby Hartsfield
: Make Number Negative Chaps, I'm looking for the best way to make a positive number into a negative one, so if I have '10' I'm looking to convert that to '-10' what's the best way to achieve this? Thanks, Rob ~| CF 8

Re: Make Number Negative

2007-06-13 Thread Claude Schneegans
cfset var1 = 0 - abs(numVar) / Why make it simple ? How about this: CFSET var = Log (1/exp(x)) ;-) -- ___ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address: [EMAIL PROTECTED])