๐ Change the negative number into a positive number  

๐ Posts: 18 โฉ๏ธ Replies: 15 โค๏ธ Reactions: 9 
For example, a 255 when printed does not display the 255 but 255. 
Replies  

๐ Posts: 4 โฉ๏ธ Replies: 15 โค๏ธ Reactions: 0 

๐ Posts: 4 โฉ๏ธ Replies: 15 โค๏ธ Reactions: 0 
if testvar < 0 then testvar = testvar  testvar  testvar end print( testvar ) This is very primitive, it works tho! 
๐ Posts: 22 โฉ๏ธ Replies: 26 โค๏ธ Reactions: 9 

๐ Posts: 22 โฉ๏ธ Replies: 26 โค๏ธ Reactions: 9 
Multiply it by 1: If you use a negative number to subtract it from 0 it also turns it into a positive number : I have just tested each method, some are less efficient than others and it is up to you to choose. On Gmod math.abs() is faster. 
๐ Posts: 4 โฉ๏ธ Replies: 15 โค๏ธ Reactions: 0 

๐ Posts: 22 โฉ๏ธ Replies: 26 โค๏ธ Reactions: 9 

๐ Posts: 22 โฉ๏ธ Replies: 26 โค๏ธ Reactions: 9 

๐ Posts: 4 โฉ๏ธ Replies: 15 โค๏ธ Reactions: 0 

๐ Posts: 22 โฉ๏ธ Replies: 26 โค๏ธ Reactions: 9 

๐ Posts: 22 โฉ๏ธ Replies: 26 โค๏ธ Reactions: 9 

๐ Posts: 18 โฉ๏ธ Replies: 15 โค๏ธ Reactions: 9 
Because I updated my scripts to create an alternative for math.mod(official link) will be deleted from gmod and also math.Dist(official link) I wouldn't want my scripts to be broken by an update of GMod. I reduce this risk by doing this. If I replace math.abs by a simple mathematical solution and not too heavy. I'm going to use (n * 1) it's quick for my needs. 
๐ Posts: 4 โฉ๏ธ Replies: 15 โค๏ธ Reactions: 0 

๐ Posts: 22 โฉ๏ธ Replies: 26 โค๏ธ Reactions: 9 
Then. I tested again the solution n * 1, Is the best alternative among those proposed : 0.004s is good. ๐ 
๐ Posts: 18 โฉ๏ธ Replies: 15 โค๏ธ Reactions: 9 