module Calculator

Defined in:

calculator.cr

Constant Summary

VERSION = "0.1.0"

Class Method Summary

Class Method Detail

def self.apply_function(number, funcName) #

[View source]
def self.calculate(n1, n2, operator) #

[View source]
def self.calculate(input : String) #

[View source]
def self.factorial(n : Int32) #

[View source]
def self.find_functions(input) #

Finds functions; Returns the begin (inclusive), end (exclusive) and name as a Tuple The corresponding value in the HashMap is the priority


[View source]
def self.find_operators(input : String) #

[View source]
def self.function_children(func, functions, input) #

Determines children and their position relative to their parent


[View source]
def self.gsub(input : String, hash : Hash(String | Regex, _)) #

[View source]
def self.is_number?(input : Char) #

[View source]
def self.is_operator?(input : Char) #

[View source]
def self.parse_number(input) #

[View source]
def self.transform(input : String) : String #

[View source]