mirror of https://github.com/nocturn9x/nimkalc.git
Added golden ratio (phi) constant
This commit is contained in:
parent
e92e40b6ea
commit
8fb3684801
|
@ -1,6 +1,6 @@
|
||||||
# Package
|
# Package
|
||||||
|
|
||||||
version = "0.2.7"
|
version = "0.2.8"
|
||||||
author = "Mattia Giambirtone"
|
author = "Mattia Giambirtone"
|
||||||
description = "An advanced parsing library for mathematical expressions and equations"
|
description = "An advanced parsing library for mathematical expressions and equations"
|
||||||
license = "Apache 2.0"
|
license = "Apache 2.0"
|
||||||
|
|
|
@ -37,7 +37,8 @@ const constants = to_table({
|
||||||
"e": Token(kind: TokenType.Float, lexeme: "2.718281828459045"),
|
"e": Token(kind: TokenType.Float, lexeme: "2.718281828459045"),
|
||||||
"tau": Token(kind: TokenType.Float, lexeme: "6.283185307179586"),
|
"tau": Token(kind: TokenType.Float, lexeme: "6.283185307179586"),
|
||||||
"inf": Token(kind: TokenType.Float, lexeme: "inf"),
|
"inf": Token(kind: TokenType.Float, lexeme: "inf"),
|
||||||
"nan": Token(kind: TokenType.Float, lexeme: "nan")
|
"nan": Token(kind: TokenType.Float, lexeme: "nan"),
|
||||||
|
"phi": Token(kind: TokenType.Float, lexeme: "1.618033988749895"),
|
||||||
})
|
})
|
||||||
# Since also math functions are hardcoded, we can use an array
|
# Since also math functions are hardcoded, we can use an array
|
||||||
const functions = ["sin", "cos", "tan", "cosh",
|
const functions = ["sin", "cos", "tan", "cosh",
|
||||||
|
|
Loading…
Reference in New Issue