I know this will really turn out to be simple, but my brain is just not working. I need a function in C# that will return -1 if the integer passed to the function has a nega
If Math.Sign did not exist, I would do this:
Math.Sign
return x == 0 ? 0 : x / Math.Abs(x);