Interface
interface FloatingPoint<T>
public interface FloatingPoint<T> <: Number<T> {
static func getE(): T
static func getInf(): T
static func getPI(): T
static func getMinDenormal(): T
static func getMinNormal(): T
static func getNaN(): T
func isInf(): Bool
func isNaN(): Bool
func isNormal(): Bool
}
Description: Provides methods related to floating-point numbers.
Parent types:
- Number<T>
static func getE()
static func getE(): T
Description: Obtains the natural constant of the T type.
Returns:
- T: natural constant of the T type
static func getInf()
static func getInf(): T
Description: Obtains the infinity of a floating-point number.
Returns:
- T: infinity of the T type
static func getPI()
static func getPI(): T
Description: Obtains the circumference constant of the T type.
Returns:
- T: circumference constant of the T type
static func getMinDenormal()
static func getMinDenormal(): T
Description: Obtains the minimum subnormal number of a single-precision floating-point number.
Returns:
- T: minimum subnormal number of the T type
static func getMinNormal()
static func getMinNormal(): T
Description: Obtains the minimum normal number of a single-precision floating-point number.
Returns:
- T: minimum normal number of the T type
static func getNaN()
static func getNaN(): T
Description: Obtains the NaN of a floating-point number.
Returns:
- T: NaN of the T type
func isInf()
func isInf(): Bool
Description: Checks whether a floating-point number is infinite.
Returns:
- Bool: If the value of the floating-point number is positive or negative infinity,
trueis returned. Otherwise,falseis returned.
func isNaN()
func isNaN(): Bool
Description: Checks whether a floating-point number is a NaN.
Returns:
- Bool: If the value of the floating-point number is a NaN,
trueis returned. Otherwise,falseis returned.
func isNormal()
func isNormal(): Bool
Description: Checks whether a floating-point number is a normal number.
Returns:
- Bool: If the floating-point number is normal,
trueis returned. Otherwise,falseis returned.
extend Float16 <: FloatingPoint<Float16>
extend Float16 <: FloatingPoint<Float16>
Description: Extends the FloatingPoint<Float16> interface for the Float16 type.
Parent types:
static func getE()
public static func getE(): Float16
Description: Obtains the natural constant of the half-precision floating-point type.
Returns:
- Float16: natural constant of the half-precision floating-point type
static func getInf()
public static func getInf(): Float16
Description: Obtains the infinity of the half-precision floating-point type.
Returns:
- Float16: infinity of the half-precision floating-point type
static func getPI()
public static func getPI(): Float16
Description: Obtains the circumference constant of the half-precision floating-point type.
Returns:
- Float16: circumference constant of the half-precision floating-point type
static func getMinDenormal()
public static func getMinDenormal(): Float16
Description: Obtains the minimum subnormal number of the half-precision floating-point type.
Returns:
- Float16: minimum subnormal number of the half-precision floating-point type
static func getMinNormal()
public static func getMinNormal(): Float16
Description: Obtains the minimum normal number of the half-precision floating-point type.
Returns:
- Float16: minimum normal number of the half-precision floating-point type
static func getNaN()
public static func getNaN(): Float16
Description: Obtains the NaN of the half-precision floating-point type.
Returns:
- Float16: NaN of the half-precision floating-point type
extend Float32 <: FloatingPoint<Float32>
extend Float32 <: FloatingPoint<Float32>
Description: Extends the FloatingPoint<Float32> interface for the Float32 type.
Parent types:
static func getE()
public static func getE(): Float32
Description: Obtains the natural constant of the single-precision floating-point type.
Returns:
- Float32: natural constant of the single-precision floating-point type
static func getInf()
public static func getInf(): Float32
Description: Obtains the infinity of the single-precision floating-point type.
Returns:
- Float32: infinity of the single-precision floating-point type
static func getPI()
public static func getPI(): Float32
Description: Obtains the circumference constant of the single-precision floating-point type.
Returns:
- Float32: circumference constant of the single-precision floating-point type
static func getMinDenormal()
public static func getMinDenormal(): Float32
Description: Obtains the minimum subnormal number of the single-precision floating-point type.
Returns:
- Float32: minimum subnormal number of the single-precision floating-point type
static func getMinNormal()
public static func getMinNormal(): Float32
Description: Obtains the minimum normal number of the single-precision floating-point type.
Returns:
- Float32: minimum normal number of the single-precision floating-point type
static func getNaN()
public static func getNaN(): Float32
Description: Obtains the NaN of the single-precision floating-point type.
Returns:
- Float32: NaN of the single-precision floating-point type
extend Float64 <: FloatingPoint<Float64>
extend Float64 <: FloatingPoint<Float64>
Description: Extends the FloatingPoint<Float64> interface for the Float64 type.
Parent types:
static func getE()
public static func getE(): Float64
Description: Obtains the natural constant of the double-precision floating-point type.
Returns:
- Float64: natural constant of the double-precision floating-point type
static func getInf()
public static func getInf(): Float64
Description: Obtains the infinity of the double-precision floating-point type.
Returns:
- Float64: infinity of the double-precision floating-point type
static func getPI()
public static func getPI(): Float64
Description: Obtains the circumference constant of the double-precision floating-point type.
Returns:
- Float64: circumference constant of the double-precision floating-point type
static func getMinDenormal()
public static func getMinDenormal(): Float64
Description: Obtains the minimum subnormal number of the double-precision floating-point type.
Returns:
- Float64: minimum subnormal number of the double-precision floating-point type
static func getMinNormal()
public static func getMinNormal(): Float64
Description: Obtains the minimum normal number of the double-precision floating-point type.
Returns:
- Float64: minimum normal number of the double-precision floating-point type
static func getNaN()
public static func getNaN(): Float64
Description: Obtains the NaN of the double-precision floating-point type.
Returns:
- Float64: NaN of the double-precision floating-point type
interface Integer<T>
public interface Integer<T> <: Number<T> {
static func isSigned(): Bool
operator func %(rhs: T): T
operator func &(rhs: T): T
operator func |(rhs: T): T
operator func ^(rhs: T): T
operator func !(): T
operator func >>(n: Int64): T
operator func <<(n: Int64): T
}
Description: Provides methods related to integer types.
Parent types:
static func isSigned()
static func isSigned(): Bool
Description: Checks whether a type is signed.
Returns:
- Bool: If the type is signed,
trueis returned. Otherwise,falseis returned.
operator func %(T)
operator func %(rhs: T): T
Description: Indicates an arithmetic operator, which is used to calculate the remainder.
Parameters:
- rhs: T: number on the right of the operator, indicating the divisor
Returns:
- T: obtained remainder
operator func &(T)
operator func &(rhs: T): T
Description: Indicates a bitwise operator, which is used to perform bitwise AND.
Parameters:
- rhs: T: number on the right of the operator
Returns:
- T: obtained result
operator func |(T)
operator func |(rhs: T): T
Description: Indicates a bitwise operator, which is used to perform bitwise OR.
Parameters:
- rhs: T: number on the right of the operator
Returns:
- T: obtained result
operator func ^(T)
operator func ^(rhs: T): T
Description: Indicates a bitwise operator, which is used to perform bitwise XOR.
Parameters:
- rhs: T: number on the right of the operator
Returns:
- T: obtained result
operator func !()
operator func !(): T
Description: Indicates a bitwise operator, which is used to perform bitwise NOT.
Returns:
- T: obtained result
operator func >>(Int64)
operator func >>(n: Int64): T
Description: Indicates a bitwise operator, which is used to perform bitwise right shift.
Parameters:
- n: Int64: number on the right of the operator, indicating the number of right shift bits
Returns:
- T: obtained result
operator func <<(Int64)
operator func <<(n: Int64): T
Description: Indicates a bitwise operator, which is used to perform bitwise left shift.
Parameters:
- n: Int64: number on the right of the operator, indicating the number of left shift bits
Returns:
- T: obtained result
extend Int16 <: Integer<Int16>
extend Int16 <: Integer<Int16>
Description: Extends the Integer<T> interface for the Int16 type.
Parent types:
static func isSigned()
public static func isSigned(): Bool
Description: Checks whether the Int16 type is signed.
Returns:
- Bool: always
true
extend Int32 <: Integer<Int32>
extend Int32 <: Integer<Int32>
Description: Extends the Integer<T> interface for the Int32 type.
Parent types:
static func isSigned()
public static func isSigned(): Bool
Description: Checks whether the Int32 type is signed.
Returns:
- Bool: always
true
extend Int64 <: Integer<Int64>
extend Int64 <: Integer<Int64>
Description: Extends the Integer<T> interface for the Int64 type.
Parent types:
static func isSigned()
public static func isSigned(): Bool
Description: Checks whether the Int64 type is signed.
Returns:
- Bool: always
true
extend Int8 <: Integer<Int8>
extend Int8 <: Integer<Int8>
Description: Extends the Integer<T> interface for the Int8 type.
Parent types:
static func isSigned()
public static func isSigned(): Bool
Description: Checks whether the Int8 type is signed.
Returns:
- Bool: always
true
extend IntNative <: Integer<IntNative>
extend IntNative <: Integer<IntNative>
Description: Extends the Integer<T> interface for the IntNative type.
Parent types:
static func isSigned()
public static func isSigned(): Bool
Description: Checks whether the IntNative type is signed.
Returns:
- Bool: always
true
extend UInt16 <: Integer<UInt16>
extend UInt16 <: Integer<UInt16>
Description: Extends the Integer<T> interface for the UInt16 type.
Parent types:
static func isSigned()
public static func isSigned(): Bool
Description: Checks whether the UInt16 type is signed.
Returns:
- Bool: always
false
extend UInt32 <: Integer<UInt32>
extend UInt32 <: Integer<UInt32>
Description: Extends the Integer<T> interface for the UInt32 type.
Parent types:
static func isSigned()
public static func isSigned(): Bool
Description: Checks whether the UInt32 type is signed.
Returns:
- Bool: always
false
extend UInt64 <: Integer<UInt64>
extend UInt64 <: Integer<UInt64>
Description: Extends the Integer<T> interface for the UInt64 type.
Parent types:
static func isSigned()
public static func isSigned(): Bool
Description: Checks whether the UInt64 type is signed.
Returns:
- Bool: always
false
extend UInt8 <: Integer<UInt8>
extend UInt8 <: Integer<UInt8>
Description: Extends the Integer<T> interface for the UInt8 type.
Parent types:
static func isSigned()
public static func isSigned(): Bool
Description: Checks whether the UInt8 type is signed.
Returns:
- Bool: always
false
extend UIntNative <: Integer<UIntNative>
extend UIntNative <: Integer<UIntNative>
Description: Extends the Integer<T> interface for the UIntNative type.
Parent types:
static func isSigned()
public static func isSigned(): Bool
Description: Checks whether the UIntNative type is signed.
Returns:
- Bool: always
false
interface MathExtension<T> (deprecated)
public interface MathExtension<T> {
static func GetPI(): T
static func GetE(): T
}
Description: Provides unified methods to obtain some mathematical constants.
NOTE
This interface will be deprecated in future releases and FloatingPoint<T> will be used instead.
static func GetPI()
static func GetPI(): T
Description: Obtains the circumference constant of the T type.
Returns:
- T: circumference constant of the T type
static func GetE()
static func GetE(): T
Description: Obtains the natural constant of the T type.
Returns:
- T: natural constant of the T type
extend Float16 <: MathExtension<Float16>
extend Float16 <: MathExtension<Float16>
Description: Extends half-precision floating-point numbers to support some mathematical constants.
Parent types:
static func GetPI()
public static func GetPI(): Float16
Description: Obtains the circumference constant of a half-precision floating-point number.
Returns:
- Float16: circumference constant of the half-precision floating-point number
static func GetE()
public static func GetE(): Float16
Description: Obtains the natural constant of a half-precision floating-point number.
Returns:
- Float16: natural constant of the half-precision floating-point number
extend Float32 <: MathExtension<Float32>
extend Float32 <: MathExtension<Float32>
Description: Extends single-precision floating-point numbers to support some mathematical constants.
Parent types:
static func GetPI()
public static func GetPI(): Float32
Description: Obtains the circumference constant of a single-precision floating-point number.
Returns:
- Float32: circumference constant of the single-precision floating-point number
static func GetE()
public static func GetE(): Float32
Description: Obtains the natural constant of a single-precision floating-point number.
Returns:
- Float32: natural constant of the single-precision floating-point number
extend Float64 <: MathExtension<Float64>
extend Float64 <: MathExtension<Float64>
Description: Extends double-precision floating-point numbers to support some mathematical constants.
Parent types:
static func GetPI()
public static func GetPI(): Float64
Description: Obtains the circumference constant of a double-precision floating-point number.
Returns:
- Float64: circumference constant of the double-precision floating-point number
static func GetE()
public static func GetE(): Float64
Description: Obtains the natural constant of a double-precision floating-point number.
Returns:
- Float64: natural constant of the double-precision floating-point number
interface MaxMinValue<T>
public interface MaxMinValue<T> {
static func getMax(): T
static func getMin(): T
}
Description: Provides methods for obtaining the maximum and minimum values.
static func getMax()
static func getMax(): T
Description: Obtains the maximum value.
Returns:
- T: maximum value
static func getMax()
static func getMin(): T
Description: Obtains the minimum value.
Returns:
- T: minimum value
extend Float16 <: MaxMinValue<Float16>
extend Float16 <: MaxMinValue<Float16>
Description: Extends the MaxMinValue interface for the Float16 type.
Parent types:
static func getMax()
public static func getMax(): Float16
Description: Obtains the maximum value of the Float16 type.
Returns:
- Float16: maximum value of the half-precision floating-point type
static func getMin()
public static func getMin(): Float16
Description: Obtains the minimum value of the Float16 type.
Returns:
- Float16: minimum value of the half-precision floating-point type
extend Float32 <: MaxMinValue<Float32>
extend Float32 <: MaxMinValue<Float32>
Description: Extends the MaxMinValue interface for the Float32 type.
Parent types:
static func getMax()
public static func getMax(): Float32
Description: Obtains the maximum value of the Float32 type.
Returns:
- Float32: maximum value of the single-precision floating-point type
static func getMin()
public static func getMin(): Float32
Description: Obtains the minimum value of the Float32 type.
Returns:
- Float32: minimum value of the single-precision floating-point type
extend Float64 <: MaxMinValue<Float64>
extend Float64 <: MaxMinValue<Float64>
Description: Extends the MaxMinValue interface for the Float64 type.
Parent types:
static func getMax()
public static func getMax(): Float64
Description: Obtains the maximum value of the Float64 type.
Returns:
- Float64: maximum value of the double-precision floating-point type
static func getMin()
public static func getMin(): Float64
Description: Obtains the minimum value of the Float64 type.
Returns:
- Float64: minimum value of the double-precision floating-point type
extend Int16 <: MaxMinValue<Int16>
extend Int16 <: MaxMinValue<Int16>
Description: Extends the MaxMinValue interface for the Int16 type.
Parent types:
static func getMax()
public static func getMax(): Int16
Description: Obtains the maximum value of the Int16 type.
Returns:
static func getMin()
public static func getMin(): Int16
Description: Obtains the minimum value of the Int16 type.
Returns:
extend Int32 <: MaxMinValue<Int32>
extend Int32 <: MaxMinValue<Int32>
Description: Extends the MaxMinValue interface for the Int32 type.
Parent types:
static func getMax()
public static func getMax(): Int32
Description: Obtains the maximum value of the Int32 type.
Returns:
static func getMin()
public static func getMin(): Int32
Description: Obtains the minimum value of the Int32 type.
Returns:
extend Int64 <: MaxMinValue<Int64>
extend Int64 <: MaxMinValue<Int64>
Description: Extends the MaxMinValue interface for the Int64 type.
Parent types:
static func getMax()
public static func getMax(): Int64
Description: Obtains the maximum value of the Int64 type.
Returns:
static func getMin()
public static func getMin(): Int64
Description: Obtains the minimum value of the Int64 type.
Returns:
extend Int8 <: MaxMinValue<Int8>
extend Int8 <: MaxMinValue<Int8>
Description: Extends the MaxMinValue interface for the Int8 type.
Parent types:
static func getMax()
public static func getMax(): Int8
Description: Obtains the maximum value of the Int8 type.
Returns:
static func getMin()
public static func getMin(): Int8
Description: Obtains the minimum value of the Int8 type.
Returns:
extend IntNative <: MaxMinValue<IntNative>
extend IntNative <: MaxMinValue<IntNative>
Description: Extends the MaxMinValue interface for the IntNative type.
Parent types:
static func getMax()
public static func getMax(): IntNative
Description: Obtains the maximum value of the IntNative type.
Returns:
static func getMin()
public static func getMin(): IntNative
Description: Obtains the minimum value of the IntNative type.
Returns:
extend UInt16 <: MaxMinValue<UInt16>
extend UInt16 <: MaxMinValue<UInt16>
Description: Extends the MaxMinValue interface for the UInt16 type.
Parent types:
static func getMax()
public static func getMax(): UInt16
Description: Obtains the maximum value of the UInt16 type.
Returns:
static func getMin()
public static func getMin(): UInt16
Description: Obtains the minimum value of the UInt16 type.
Returns:
extend UInt32 <: MaxMinValue<UInt32>
extend UInt32 <: MaxMinValue<UInt32>
Description: Extends the MaxMinValue interface for the UInt32 type.
Parent types:
static func getMax()
public static func getMax(): UInt32
Description: Obtains the maximum value of the UInt32 type.
Returns:
static func getMin()
public static func getMin(): UInt32
Description: Obtains the minimum value of the UInt32 type.
Returns:
extend UInt64 <: MaxMinValue<UInt64>
extend UInt64 <: MaxMinValue<UInt64>
Description: Extends the MaxMinValue interface for the UInt64 type.
Parent types:
static func getMax()
public static func getMax(): UInt64
Description: Obtains the maximum value of the UInt64 type.
Returns:
static func getMin()
public static func getMin(): UInt64
Description: Obtains the minimum value of the UInt64 type.
Returns:
extend UInt8 <: MaxMinValue<UInt8>
extend UInt8 <: MaxMinValue<UInt8>
Description: Extends the MaxMinValue interface for the UInt8 type.
Parent types:
static func getMax()
public static func getMax(): UInt8
Description: Obtains the maximum value of the UInt8 type.
Returns:
static func getMin()
public static func getMin(): UInt8
Description: Obtains the minimum value of the UInt8 type.
Returns:
extend UIntNative <: MaxMinValue<UIntNative>
extend UIntNative <: MaxMinValue<UIntNative>
Description: Extends the MaxMinValue interface for the UIntNative type.
Parent types:
static func getMax()
public static func getMax(): UIntNative
Description: Obtains the maximum value of the UIntNative type.
Returns:
- UIntNative: maximum value of the UIntNative type
static func getMin()
public static func getMin(): UIntNative
Description: Obtains the minimum value of the UIntNative type.
Returns:
- UIntNative: minimum value of the UIntNative type
interface Number<T>
public interface Number<T> {
operator func +(rhs: T): T
operator func -(rhs: T): T
operator func *(rhs: T): T
operator func /(rhs: T): T
operator func -(): T
}
Description: Provides methods related to numeric types.
operator func +(T)
operator func +(rhs: T): T
Description: Indicates an arithmetic operator, which is used to perform addition.
Parameters:
- rhs: T: number on the right of the operator, indicating the other addend
Returns:
- T: obtained sum
operator func -(T)
operator func -(rhs: T): T
Description: Indicates an arithmetic operator, which is used to perform subtraction.
Parameters:
- rhs: T: number on the right of the operator, indicating the subtrahend
Returns:
- T: obtained difference
operator func *(T)
operator func *(rhs: T): T
Description: Indicates an arithmetic operator, which is used to perform multiplication.
Parameters:
- rhs: T: number on the right of the operator, indicating the other multiplier
Returns:
- T: obtained product
operator func /(T)
operator func /(rhs: T): T
Description: Indicates an arithmetic operator, which is used to perform division.
Parameters:
- rhs: T: number on the right of the operator, indicating the divisor
Returns:
- T: obtained quotient
operator func -()
operator func -(): T
Description: Indicates an arithmetic operator, which is used to calculate a negated value.
Returns:
- T: negated value
extend Float16 <: Number<Float16>
extend Float16 <: Number<Float16> {}
Description: Extends the Number<T> interface for the Float16 type.
Parent types:
extend Float32 <: Number<Float32>
extend Float32 <: Number<Float32> {}
Description: Extends the Number<T> interface for the Float32 type.
Parent types:
extend Float64 <: Number<Float64>
extend Float64 <: Number<Float64> {}
Description: Extends the Number<T> interface for the Float64 type.
Parent types:
extend Int16 <: Number<Int16>
extend Int16 <: Number<Int16> {}
Description: Extends the Number<T> interface for the Int16 type.
Parent types:
extend Int32 <: Number<Int32>
extend Int32 <: Number<Int32> {}
Description: Extends the Number<T> interface for the Int32 type.
Parent types:
extend Int64 <: Number<Int64>
extend Int64 <: Number<Int64> {}
Description: Extends the Number<T> interface for the Int64 type.
Parent types:
extend Int8 <: Number<Int8>
extend Int8 <: Number<Int8> {}
Description: Extends the Number<T> interface for the Int8 type.
Parent types:
extend IntNative <: Number<IntNative>
extend IntNative <: Number<IntNative> {}
Description: Extends the Number<T> interface for the IntNative type.
Parent types:
extend UInt16 <: Number<UInt16>
extend UInt16 <: Number<UInt16> {}
Description: Extends the Number<T> interface for the UInt16 type.
Parent types:
extend UInt32 <: Number<UInt32>
extend UInt32 <: Number<UInt32> {}
Description: Extends the Number<T> interface for the UInt32 type.
Parent types:
extend UInt64 <: Number<UInt64>
extend UInt64 <: Number<UInt64> {}
Description: Extends the Number<T> interface for the UInt64 type.
Parent types:
extend UInt8 <: Number<UInt8>
extend UInt8 <: Number<UInt8> {}
Description: Extends the Number<T> interface for the UInt8 type.
Parent types:
extend UIntNative <: Number<UIntNative>
extend UIntNative <: Number<UIntNative> {}
Description: Extends the Number<T> interface for the UIntNative type.
Parent types: