Class: Keisan::Functions::Abs

Inherits:
CMathFunction show all
Defined in:
lib/keisan/functions/abs.rb

Instance Attribute Summary

Attributes inherited from ProcFunction

#function_proc

Attributes inherited from Keisan::Function

#arity, #name

Instance Method Summary collapse

Methods inherited from MathFunction

#differentiate, #simplify

Methods inherited from ProcFunction

#call, #evaluate, #simplify, #value

Methods inherited from Keisan::Function

#differentiate, #evaluate, #simplify, #value

Constructor Details

#initializeAbs

Returns a new instance of Abs.



4
5
6
# File 'lib/keisan/functions/abs.rb', line 4

def initialize
  super("abs", Proc.new {|arg| arg.abs})
end