* This Int64 with bits shifted to the right by the given amount with filling zeros to the left * @this {!Int64} * @param {Int64|UInt64|number} numBits Number of bits * @returns {!Int64} Shifted result value
(numBits)
| 880 | * @returns {!Int64} Shifted result value |
| 881 | */ |
| 882 | shru (numBits) { |
| 883 | if (Int64.isInt64(numBits) || UInt64.isUInt64(numBits)) { |
| 884 | numBits = numBits.toInt32() |
| 885 | } |
| 886 | numBits &= 63 |
| 887 | if (numBits === 0) { |
| 888 | return this |
| 889 | } else { |
| 890 | let high = this.high |
| 891 | if (numBits < 32) { |
| 892 | let low = this.low |
| 893 | return Int64.fromBits((low >>> numBits) | (high << (32 - numBits)), high >>> numBits) |
| 894 | } else if (numBits === 32) { |
| 895 | return Int64.fromBits(high, 0) |
| 896 | } else { |
| 897 | return Int64.fromBits(high >>> (numBits - 32), 0) |
| 898 | } |
| 899 | } |
| 900 | } |
| 901 | } |
| 902 | |
| 903 | Object.defineProperty(Int64.prototype, '__isInt64__', { value: true }) |