Why does the function not support Math.sign()?


#1

Will it be supported in later versions?


#2

Math.signs() sounds like it can be a very useful expression in Axure RP. I would be happy to submit this as a feature request on your behalf for our product team to look into implementing this.

In the meantime, if you are looking to extract the sign out of a number, you can use a math expression like:

[[ Num / Math.abs(Num) ]]

I have included a simple test file demonstrating this. Math.sign.rp (46.2 KB)


#3

The reason why I asked to add the math.sign() function is because it returns 3 values, and I sometimes have to deal with num equal to 0.

so the expression looks like this [[ Num!=0 && Math.abs(Num) /Num || 0]]. not elegant enough.

In addition, String object and Number object should also be considered, very grateful.