var number = 3144134277.518717 | 0;
console.log(number); // -> -1150833019
3144134277.5187168 | 0 // -> Operator '|' cannot be applied to operands
// of type 'double' and 'int'
Convert.ToInt64(3144134277.5187168) | 0 // -> 3144134278
| implicitly converts its operands to 32-bit ints before doing the bitwise OR (which is a no-op because the second arg is
0). So really what you're seeing is the result of the
ToNumber(argument). (You can largely ignore this bit.)
So in C#, I think that's roughly:
double value = 3144134277.5187168; bool negative = value < 0; long n = Convert.ToInt64(Math.Floor(Math.Abs(value))); n = n % 4294967296; n = n > 2147483648 ? n - 4294967296 : n; int i = (int)n; i = negative ? -i : i; Console.WriteLine(i); // -1150833019
...written verbosely for clarity.
And just double-checking, those steps with
-3144134277.5187168 give you
1150833019, which is as it's supposed to be as well.