TMath::Sign(a,b) question

With the two argument approach, you can have the “standard” behaviour using :

TMath::Sign(1, b)

which returns 1 or -1 depending on the sign of b,
but also you can have it return a with the same sign as b, using:

TMath::Sign(a, b)

as this might also be useful in several cases, like:

if (TMath::Sign(iy,idy) == iy)

Cheers, Fons.