Class: Numeric

Inherits:
Object
  • Object
show all
Includes:
Comparable
Defined in:
lib/laser/standard_library/numbers.rb

Direct Known Subclasses

Float, Integer

Instance Method Summary collapse

Methods included from Comparable

#<, #<=, #==, #>, #>=, #between?, compare_int

Instance Method Details

#%(other) ⇒ Object

pure: true builtin: true



5
6
# File 'lib/laser/standard_library/numbers.rb', line 5

def %(other)
end

#+@Object

pure: true builtin: true



9
10
# File 'lib/laser/standard_library/numbers.rb', line 9

def +@
end

#-@Object

pure: true builtin: true



13
14
# File 'lib/laser/standard_library/numbers.rb', line 13

def -@
end

#<=>(other) ⇒ Object

pure: true builtin: true



17
18
# File 'lib/laser/standard_library/numbers.rb', line 17

def <=>(other)
end

#absObject

pure: true builtin: true



21
22
# File 'lib/laser/standard_library/numbers.rb', line 21

def abs
end

#abs2Object

pure: true builtin: true



25
26
# File 'lib/laser/standard_library/numbers.rb', line 25

def abs2
end

#angleObject

pure: true builtin: true



33
34
35
# File 'lib/laser/standard_library/numbers.rb', line 33

def angle
  arg
end

#argObject

pure: true builtin: true



29
30
# File 'lib/laser/standard_library/numbers.rb', line 29

def arg
end

#ceilObject

pure: true builtin: true



38
39
# File 'lib/laser/standard_library/numbers.rb', line 38

def ceil
end

#coerce(num) ⇒ Object

pure: true builtin: true



42
43
# File 'lib/laser/standard_library/numbers.rb', line 42

def coerce(num)
end

#conjObject

pure: true builtin: true



46
47
# File 'lib/laser/standard_library/numbers.rb', line 46

def conj
end

#conjugateObject

pure: true builtin: true



50
51
52
# File 'lib/laser/standard_library/numbers.rb', line 50

def conjugate
  conj
end

#denominatorObject

pure: true builtin: true



55
56
# File 'lib/laser/standard_library/numbers.rb', line 55

def denominator
end

#div(numeric) ⇒ Object

pure: true builtin: true



59
60
# File 'lib/laser/standard_library/numbers.rb', line 59

def div(numeric)
end

#divmod(numeric) ⇒ Object

pure: true builtin: true



63
64
# File 'lib/laser/standard_library/numbers.rb', line 63

def divmod(numeric)
end

#eql?(numeric) ⇒ Boolean

pure: true builtin: true returns: Boolean



68
69
# File 'lib/laser/standard_library/numbers.rb', line 68

def eql?(numeric)
end

#fdiv(numeric) ⇒ Object

pure: true builtin: true



72
73
# File 'lib/laser/standard_library/numbers.rb', line 72

def fdiv(numeric)
end

#floorObject

pure: true builtin: true



76
77
# File 'lib/laser/standard_library/numbers.rb', line 76

def floor
end

#iObject

pure: true builtin: true



80
81
# File 'lib/laser/standard_library/numbers.rb', line 80

def i
end

#imagObject

pure: true builtin: true



84
85
# File 'lib/laser/standard_library/numbers.rb', line 84

def imag
end

#imaginaryObject

pure: true builtin: true



88
89
# File 'lib/laser/standard_library/numbers.rb', line 88

def imaginary
end

#integer?Boolean

pure: true builtin: true returns: Boolean



93
94
# File 'lib/laser/standard_library/numbers.rb', line 93

def integer?
end

#magnitudeObject

pure: true builtin: true



97
98
99
# File 'lib/laser/standard_library/numbers.rb', line 97

def magnitude
  abs
end

#modulo(numeric) ⇒ Object

pure: true builtin: true



102
103
# File 'lib/laser/standard_library/numbers.rb', line 102

def modulo(numeric)
end

#nonzero?Boolean

pure: true builtin: true returns: Boolean



107
108
# File 'lib/laser/standard_library/numbers.rb', line 107

def nonzero?
end

#numeratorObject

pure: true builtin: true



111
112
# File 'lib/laser/standard_library/numbers.rb', line 111

def numerator
end

#phaseObject

pure: true builtin: true



115
116
117
# File 'lib/laser/standard_library/numbers.rb', line 115

def phase
  arg
end

#polarObject

pure: true builtin: true



120
121
# File 'lib/laser/standard_library/numbers.rb', line 120

def polar
end

#pretty_printObject

pure: true builtin: true



124
125
# File 'lib/laser/standard_library/numbers.rb', line 124

def pretty_print
end

#pretty_print_cycleObject

pure: true builtin: true



128
129
# File 'lib/laser/standard_library/numbers.rb', line 128

def pretty_print_cycle
end

#quo(numeric) ⇒ Object

pure: true builtin: true



132
133
# File 'lib/laser/standard_library/numbers.rb', line 132

def quo(numeric)
end

#realObject

pure: true builtin: true



136
137
# File 'lib/laser/standard_library/numbers.rb', line 136

def real
end

#real?Boolean

pure: true builtin: true returns: Boolean



141
142
# File 'lib/laser/standard_library/numbers.rb', line 141

def real?
end

#rectObject

pure: true builtin: true



145
146
# File 'lib/laser/standard_library/numbers.rb', line 145

def rect
end

#rectangularObject

pure: true builtin: true



149
150
151
# File 'lib/laser/standard_library/numbers.rb', line 149

def rectangular
  rect
end

#remainder(numeric) ⇒ Object

pure: true builtin: true



154
155
# File 'lib/laser/standard_library/numbers.rb', line 154

def remainder(numeric)
end

#round(numdigits = 0) ⇒ Object

pure: true builtin: true



158
159
# File 'lib/laser/standard_library/numbers.rb', line 158

def round(numdigits=0)
end

#singleton_method_added(p1) ⇒ Object

pure: true builtin: true raise: always

Raises:



163
164
165
# File 'lib/laser/standard_library/numbers.rb', line 163

def singleton_method_added(p1)
  raise TypeError.new
end

#step(limit, step = 1) ⇒ Object

pure: true builtin: true yield_usage: optional



169
170
# File 'lib/laser/standard_library/numbers.rb', line 169

def step(limit, step=1)
end

#to_cObject

pure: true builtin: true



173
174
# File 'lib/laser/standard_library/numbers.rb', line 173

def to_c
end

#to_intObject

pure: true builtin: true



177
178
# File 'lib/laser/standard_library/numbers.rb', line 177

def to_int
end

#truncateObject

pure: true builtin: true



181
182
# File 'lib/laser/standard_library/numbers.rb', line 181

def truncate
end

#zero?Boolean

pure: true builtin: true returns: Boolean



186
187
# File 'lib/laser/standard_library/numbers.rb', line 186

def zero?
end