/** @packageDocumentation * @module OrbitGT */ declare type int32 = number; declare type float64 = number; /** * Class ALong defines a signed 64-bit integer using two (high and low) 64-bit floats. * * @version 1.0 February 2019 */ /** @internal */ export declare class ALong { /** The value of a 32 bit unit */ private static readonly _U32; /** The value of a 31 bit unit */ private static readonly _U31; /** The value of a 24 bit unit */ private static readonly _U24; /** The value of a 16 bit unit */ private static readonly _U16; /** The value of a 8 bit unit */ private static readonly _U8; /** The integer value 0 */ static ZERO: ALong; /** The integer value 1 */ static ONE: ALong; /** The integer value 2 */ static TWO: ALong; /** The integer value 4 */ static FOUR: ALong; /** The integer value 10 */ static TEN: ALong; /** The integer value -1 */ static MINUS_ONE: ALong; /** The maximum positive value of a signed_ 64-bit integer (9223372036854775807) */ static MAX_VALUE: ALong; /** The minimum negative value of a signed 64-bit integer (-9223372036854775808) */ static MIN_VALUE: ALong; /** The high value (unsigned integer [0..U32[ after normalization, negative i64 if >= U31) */ private _high; /** The low value (unsigned integer [0..U32[ after normalization) */ private _low; /** * Create a new value. * @param high the 32-bit high part. * @param low the 32-bit low part. */ private constructor(); /** * Check if the number is zero. * @return true if zero. */ isZero(): boolean; /** * Check if the number is not zero. * @return true if zero. */ isNonZero(): boolean; /** * Check if the number is one. * @return true if one. */ isOne(): boolean; /** * Check if the number is positive. * @return true if positive (false if zero). */ isPositive(): boolean; /** * Check if the number is negative. * @return true if negative (false if zero). */ isNegative(): boolean; /** * Normalize the number. * @return this number for chaining operations. */ private static normalize2; /** * Negate the number. * @return the result. */ negate(): ALong; /** * Add a number. * @param value the value to add. * @return the result. */ add(value: ALong): ALong; /** * Add a number. * @param value the value to add. * @return the result. */ addInt(value: int32): ALong; /** * Increase by one. * @return the result. */ increase(): ALong; /** * Subtract a number. * @param value the value to subtract. * @return the result. */ sub(value: ALong): ALong; /** * Subtract a number. * @param value the value to subtract. * @return the result. */ subInt(value: int32): ALong; /** * Decrease by one. * @return the result. */ decrease(): ALong; /** * Multiply two unsigned 32-bit integer values. * @param v1 the first value. * @param v2 the second value. * @param high0 the initial high value of the result. * @return the unsigned 64-bit product. */ private static mul2; /** * Multiply by a number. * @param value the value to multiply. * @return the result. */ mul(value: ALong): ALong; /** * Multiply by a number. * @param value the value to multiply. * @return the result. */ mulInt(value: int32): ALong; /** * Divide by a number. * @param value the value to divide by. * @return the result. */ div(value: ALong): ALong; /** * Divide by a number. * @param value the value to divide by. * @return the result. */ divInt(value: int32): ALong; /** * Modulate by a number. * @param value the value to modulate by. * @return the result. */ mod(value: ALong): ALong; /** * Modulate by a number. * @param value the value to modulate by. * @return the modulo value. */ modInt(value: int32): int32; /** * Create a new number. * @param value the 64-bit float value. * @return the new number. */ static fromDouble(value: float64): ALong; /** * Get a double. * @return the double value. */ toDouble(): float64; /** * Create a new number. * @param value the 32-bit integer value. * @return the new number. */ static fromInt(value: float64): ALong; /** * Get a 32-bit integer. * @return the integer value. */ toInt(): int32; /** * Create a new number. * @param i1 the 32-bit high part. * @param i0 the 32-bit low part. * @return the new number. */ static fromHighLow(i1: float64, i0: float64): ALong; /** * Get the high part. * @return the integer value (0..4294967295) */ getHigh(): float64; /** * Get the low part. * @return the integer value (0..4294967295) */ getLow(): float64; /** * Create a new number. * @param b7 the most significant 8-bit byte of the high part (0..255). * @param b6 the most third 8-bit byte of the high part (0..255). * @param b5 the most second 8-bit byte of the high part (0..255). * @param b4 the most least 8-bit byte of the high part (0..255). * @param b3 the most significant 8-bit byte of the low part (0..255). * @param b2 the most third 8-bit byte of the low part (0..255). * @param b1 the most second 8-bit byte of the low part (0..255). * @param b0 the most least 8-bit byte of the low part (0..255). * @return the new number. */ static fromBytes(b7: float64, b6: float64, b5: float64, b4: float64, b3: float64, b2: float64, b1: float64, b0: float64): ALong; /** * Get a byte. * @param index the index of the byte (0..7 where 0 is low). * @return the byte value (0..255) */ getByte(index: int32): int32; /** * Check if a number is equal. * @param value the value to check. * @return true if equal. */ isEqualTo(value: ALong): boolean; /** * Check if a number is not equal. * @param value the value to check. * @return true if equal. */ isNotEqualTo(value: ALong): boolean; /** * Check if a number is equal. * @param value the value to check. * @return true if equal. */ same(value: ALong): boolean; /** * Check if a number is equal. * @param value the value to check. * @return true if equal. */ equals(value: ALong): boolean; /** * Compare this long to another long. * @param value the other long. * @return zero if equal, positive if smaller, or negative if value is larger. */ compareTo(value: ALong): int32; /** * Check if a value is larger. * @param value the value to check. * @return true if this number is larger than the check value. */ isLargerThan(value: ALong): boolean; /** * Check if a value is larger. * @param value the value to check. * @return true if this number is larger than the check value. */ isLargerThanOrEqualTo(value: ALong): boolean; /** * Check if a value is smaller. * @param value the value to check. * @return true if this number is smaller than the check value. */ isSmallerThan(value: ALong): boolean; /** * Check if a value is smaller. * @param value the value to check. * @return true if this number is smaller than the check value. */ isSmallerThanOrEqualTo(value: ALong): boolean; /** * Get the maximum value. * @param v1 the first value. * @param v2 the second value. * @return the maximum value. */ static max(v1: ALong, v2: ALong): ALong; /** * Get the minimum value. * @param v1 the first value. * @param v2 the second value. * @return the minimum value. */ static min(v1: ALong, v2: ALong): ALong; /** * Create a number from a string. * @param svalue the string value. * @param radix the radix (2 to 36). * @return the number. */ static fromRadixString(svalue: string, radix: int32): ALong; /** * Create a number from a decimal string. * @param value the string value. * @return the number. */ static fromString(value: string): ALong; /** * Create a number from a hexadecimal string. * @param value the string value. * @return the number. */ static fromHexString(value: string): ALong; /** * Convert the number to a string. * @param radix the radix (2 to 36). * @return the string. */ getRadixString(radix: int32): string; /** * Convert the number to a decimal string. * @return the string. */ getString(): string; /** * Convert the number to a hexadecimal string. * @return the string. */ getHexString(): string; /** * The standard toString method. * @see Object#toString */ toString(): string; } export {}; //# sourceMappingURL=ALong.d.ts.map