none
Missing form Math library RRS feed

  • Question

  • Something conspicuous by its absence from the Math library is the sign function. I would like to see Math.Sgn among the maths functions. It would be used as, for example,

    y = Math.Sgn(x).

    In the meantime I'm using:-

    If x = 0 then

       Sgn = 0

    Else

       Sgn = x / Math.Abs(x)

    EndIf

    As I use it a lot, it means a lot of coding, changing the x every time to the name of the variable I'm seeking the sign of.

    Tuesday, September 20, 2011 10:06 AM

Answers

  • If you need more math functions Data Extension has MathPlus which contains more functions than standard Math library.

    If I remember right I have added Sign() to it a few version ago.


    Sorry My Bad English
    • Edited by Oskariok Wednesday, September 21, 2011 4:03 PM
    • Marked as answer by litdevModerator Tuesday, September 27, 2011 5:40 PM
    Wednesday, September 21, 2011 4:02 PM

All replies

  • Want me to write you an extension for it?
    ~~AirWaves!!~~
    Tuesday, September 20, 2011 4:22 PM
  • If you need more math functions Data Extension has MathPlus which contains more functions than standard Math library.

    If I remember right I have added Sign() to it a few version ago.


    Sorry My Bad English
    • Edited by Oskariok Wednesday, September 21, 2011 4:03 PM
    • Marked as answer by litdevModerator Tuesday, September 27, 2011 5:40 PM
    Wednesday, September 21, 2011 4:02 PM