Integer [Src] [A: Integer[A] val]

trait val Integer[A: Integer[A] val] is
  Real[A] val

Implements


Constructors

create [Src]

new val create(
  value: A)
: Real[A] val^

Parameters

  • value: A

Returns


from [Src] [B: ((I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val | F32 val | F64 val) & Real[B] val)]

new val from[B: ((I8 val | I16 val | I32 val | 
    I64 val | I128 val | ILong val | 
    ISize val | U8 val | U16 val | 
    U32 val | U64 val | U128 val | 
    ULong val | USize val | F32 val | 
    F64 val) & Real[B] val)](
  a: B)
: Real[A] val^

Parameters

  • a: B

Returns


min_value [Src]

new val min_value()
: Real[A] val^

Returns


max_value [Src]

new val max_value()
: Real[A] val^

Returns


Public Functions

add_unsafe [Src]

Unsafe operation. If the operation overflows, the result is undefined.

fun box add_unsafe(
  y: A)
: A

Parameters

  • y: A

Returns

  • A

sub_unsafe [Src]

Unsafe operation. If the operation overflows, the result is undefined.

fun box sub_unsafe(
  y: A)
: A

Parameters

  • y: A

Returns

  • A

mul_unsafe [Src]

Unsafe operation. If the operation overflows, the result is undefined.

fun box mul_unsafe(
  y: A)
: A

Parameters

  • y: A

Returns

  • A

div_unsafe [Src]

Unsafe operation. If y is 0, the result is undefined. If the operation overflows, the result is undefined.

fun box div_unsafe(
  y: A)
: A

Parameters

  • y: A

Returns

  • A

divmod_unsafe [Src]

Unsafe operation. If y is 0, the result is undefined. If the operation overflows, the result is undefined.

fun box divmod_unsafe(
  y: A)
: (A , A)

Parameters

  • y: A

Returns

  • (A , A)

mod_unsafe [Src]

Unsafe operation. If y is 0, the result is undefined. If the operation overflows, the result is undefined.

fun box mod_unsafe(
  y: A)
: A

Parameters

  • y: A

Returns

  • A

neg_unsafe [Src]

Unsafe operation. If the operation overflows, the result is undefined.

fun box neg_unsafe()
: A

Returns

  • A

op_and [Src]

fun box op_and(
  y: A)
: A

Parameters

  • y: A

Returns

  • A

op_or [Src]

fun box op_or(
  y: A)
: A

Parameters

  • y: A

Returns

  • A

op_xor [Src]

fun box op_xor(
  y: A)
: A

Parameters

  • y: A

Returns

  • A

op_not [Src]

fun box op_not()
: A

Returns

  • A

bswap [Src]

fun box bswap()
: A

Returns

  • A

add [Src]

fun box add(
  y: A)
: A

Parameters

  • y: A

Returns

  • A

sub [Src]

fun box sub(
  y: A)
: A

Parameters

  • y: A

Returns

  • A

mul [Src]

fun box mul(
  y: A)
: A

Parameters

  • y: A

Returns

  • A

div [Src]

fun box div(
  y: A)
: A

Parameters

  • y: A

Returns

  • A

divmod [Src]

fun box divmod(
  y: A)
: (A , A)

Parameters

  • y: A

Returns

  • (A , A)

mod [Src]

fun box mod(
  y: A)
: A

Parameters

  • y: A

Returns

  • A

neg [Src]

fun box neg()
: A

Returns

  • A

eq [Src]

fun box eq(
  y: A)
: Bool val

Parameters

  • y: A

Returns


ne [Src]

fun box ne(
  y: A)
: Bool val

Parameters

  • y: A

Returns


lt [Src]

fun box lt(
  y: A)
: Bool val

Parameters

  • y: A

Returns


le [Src]

fun box le(
  y: A)
: Bool val

Parameters

  • y: A

Returns


ge [Src]

fun box ge(
  y: A)
: Bool val

Parameters

  • y: A

Returns


gt [Src]

fun box gt(
  y: A)
: Bool val

Parameters

  • y: A

Returns


min [Src]

fun box min(
  y: A)
: A

Parameters

  • y: A

Returns

  • A

max [Src]

fun box max(
  y: A)
: A

Parameters

  • y: A

Returns

  • A

hash [Src]

fun box hash()
: U64 val

Returns


string [Src]

fun box string()
: String iso^

Returns


i8 [Src]

fun box i8()
: I8 val

Returns


i16 [Src]

fun box i16()
: I16 val

Returns


i32 [Src]

fun box i32()
: I32 val

Returns


i64 [Src]

fun box i64()
: I64 val

Returns


i128 [Src]

fun box i128()
: I128 val

Returns


ilong [Src]

fun box ilong()
: ILong val

Returns


isize [Src]

fun box isize()
: ISize val

Returns


u8 [Src]

fun box u8()
: U8 val

Returns


u16 [Src]

fun box u16()
: U16 val

Returns


u32 [Src]

fun box u32()
: U32 val

Returns


u64 [Src]

fun box u64()
: U64 val

Returns


u128 [Src]

fun box u128()
: U128 val

Returns


ulong [Src]

fun box ulong()
: ULong val

Returns


usize [Src]

fun box usize()
: USize val

Returns


f32 [Src]

fun box f32()
: F32 val

Returns


f64 [Src]

fun box f64()
: F64 val

Returns


i8_unsafe [Src]

fun box i8_unsafe()
: I8 val

Returns


i16_unsafe [Src]

fun box i16_unsafe()
: I16 val

Returns


i32_unsafe [Src]

fun box i32_unsafe()
: I32 val

Returns


i64_unsafe [Src]

fun box i64_unsafe()
: I64 val

Returns


i128_unsafe [Src]

fun box i128_unsafe()
: I128 val

Returns


ilong_unsafe [Src]

fun box ilong_unsafe()
: ILong val

Returns


isize_unsafe [Src]

fun box isize_unsafe()
: ISize val

Returns


u8_unsafe [Src]

fun box u8_unsafe()
: U8 val

Returns


u16_unsafe [Src]

fun box u16_unsafe()
: U16 val

Returns


u32_unsafe [Src]

fun box u32_unsafe()
: U32 val

Returns


u64_unsafe [Src]

fun box u64_unsafe()
: U64 val

Returns


u128_unsafe [Src]

fun box u128_unsafe()
: U128 val

Returns


ulong_unsafe [Src]

fun box ulong_unsafe()
: ULong val

Returns


usize_unsafe [Src]

fun box usize_unsafe()
: USize val

Returns


f32_unsafe [Src]

fun box f32_unsafe()
: F32 val

Returns


f64_unsafe [Src]

fun box f64_unsafe()
: F64 val

Returns


compare

fun box compare(
  that: A)
: (Less val | Equal val | Greater val)

Parameters

  • that: A

Returns