Message 1 of 3
Trying to change negative numbers to postive numbers.
Not applicable
10-03-2007
10:12 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to change numbers like -5, -23.46 to turn into 5, 23.46. I hear abs was supposed to do that but it still returns as negative.
This returns -26.
Am I doing something completly wrong? I am quite new to mel but it isn't the longes code... Is there a diffrent way of turning negative nr to positve while keeping positive nr positive?
int $n = -26;
abs $n;
print $n;
This returns -26.
Am I doing something completly wrong? I am quite new to mel but it isn't the longes code... Is there a diffrent way of turning negative nr to positve while keeping positive nr positive?