module EEEval::Constants

Defined in:

constants.cr

Constant Summary

DEFAULT_ENV = {"pi" => Math::PI, "e" => Math::E, "tau" => Math::TAU, "sqrt2" => Math.sqrt(2.0), "phi" => (1.0 + (Math.sqrt(5.0))) / 2.0, "rad2deg" => 180.0 / Math::PI, "deg2rad" => Math::PI / 180.0, "g" => 9.80665, "inf" => Float64::INFINITY, "nan" => Float64::NAN} of String => Float64

Default environment: named mathematical constants available in every expression without explicit declaration.

DEG2RAD = Math::PI / 180.0
E = Math::E
G = 9.80665
INF = Float64::INFINITY
NAN = Float64::NAN
PHI = (1.0 + (Math.sqrt(5.0))) / 2.0
PI = Math::PI

Crystal-level constants kept for direct use in Crystal code

RAD2DEG = 180.0 / Math::PI
SQRT2 = Math.sqrt(2.0)
TAU = Math::TAU