How would I go about creating a proc(correct wording?) in which, when given the value 20, would equal 0, and when given anything larger than 20 would equal -(value-20)?
Keep in mind I can't use any if statements here, only plain(aka headache) math.
edit: Uh, sorry if this sounds confusing(it sure did to me!), perhaps I better explain myself in code?
I need to create a proc that returns the same result such as:
proc/a(x)
if(x <= 20) x = (-20+x)
else x = -(x-20)
return x
But without the if()s and else()s.
edit2: see [link]
-(x-20)=0 for x=20
That expands to 20-x.