struct DynamicMint

Defined in:

math/dynamic_mint.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(x : self) #

[View source]
def self.new(x : Int) #

[View source]
def self.new #

[View source]

Class Method Detail

def self.mod : Int32 #

[View source]
def self.mod=(m : Int32) #

[View source]
def self.raw(v : Int32) #

[View source]
def self.raw(v) #

[View source]
def self.zero #

[View source]

Instance Method Detail

def *(v) #

[View source]
def **(exponent : Int) #

[View source]
def +(v) #

[View source]
def + #

[View source]
def -(v) #

[View source]
def - #

[View source]
def /(v) #

[View source]
def //(v) #

[View source]
def <(other) #

[View source]
def <=(other) #

[View source]
def ==(v : self) #

[View source]
def ==(v) #
Description copied from struct Struct

Returns true if this struct is equal to other.

Both structs's instance vars are compared to each other. Thus, two structs are considered equal if each of their instance variables are equal. Subclasses should override this method to provide specific equality semantics.

struct Point
  def initialize(@x : Int32, @y : Int32)
  end
end

p1 = Point.new 1, 2
p2 = Point.new 1, 2
p3 = Point.new 3, 4

p1 == p2 # => true
p1 == p3 # => false

[View source]
def >(other) #

[View source]
def >=(other) #

[View source]
def abs #

[View source]
def abs2 #

[View source]
def inspect(io : IO) : Nil #
Description copied from struct Struct

Appends this struct's name and instance variables names and values to the given IO.

struct Point
  def initialize(@x : Int32, @y : Int32)
  end
end

p1 = Point.new 1, 2
p1.to_s    # "Point(@x=1, @y=2)"
p1.inspect # "Point(@x=1, @y=2)"

[View source]
def inv #

[View source]
def pred #

[View source]
def succ #

[View source]
def to_i64 : Int64 #

[View source]
def to_s(io : IO) : Nil #
Description copied from struct Struct

Same as #inspect(io).


[View source]
def value : Int32 #

[View source]