How to use two integers to represent integral part of double
I'm getting a millisec timestamp in ActionScript as a Number object which can return a primitive double. I'd like to cast it for a backend that expects a primitive long long millisec, however the language does not provide long long. Am thinking a double can be converted to two ints and submitted together. Any encounter something like开发者_JS百科 this and have a solution?
You might as well just convert your double to an int in ActionScript. You won't lose any accuracy because in ActionScript doubles and ints have the same bit depth. Then the conversion from int to long long should be automatic.
精彩评论