* This UInt64 with bits shifted to the right by the given amount with filling zeros to the left * @this {!UInt64} * @param {Int64|UInt64|number} numBits Number of bits * @returns {!UInt64} Shifted result value
(numBits)
| 1772 | * @returns {!UInt64} Shifted result value |
| 1773 | */ |
| 1774 | shru (numBits) { |
| 1775 | if (Int64.isInt64(numBits) || UInt64.isUInt64(numBits)) { |
| 1776 | numBits = numBits.toInt32() |
| 1777 | } |
| 1778 | numBits &= 63 |
| 1779 | if (numBits === 0) { |
| 1780 | return this |
| 1781 | } else { |
| 1782 | let high = this.high |
| 1783 | if (numBits < 32) { |
| 1784 | let low = this.low |
| 1785 | return UInt64.fromBits((low >>> numBits) | (high << (32 - numBits)), high >>> numBits) |
| 1786 | } else if (numBits === 32) { |
| 1787 | return UInt64.fromBits(high, 0) |
| 1788 | } else { |
| 1789 | return UInt64.fromBits(high >>> (numBits - 32), 0) |
| 1790 | } |
| 1791 | } |
| 1792 | } |
| 1793 | } |
| 1794 | |
| 1795 | Object.defineProperty(UInt64.prototype, '__isUInt64__', { value: true }) |