06 Constants in tag expressions - domain-centric/template_engine GitHub Wiki

A Constant is a value that does not change value over time.

The template_engine comes with several mathematical constants.

Custom Constants

You can create and add your own Constants by manipulating the TemplateEngine.constants field.
See Example

Available Constants

e Constant

description: Base of the natural logarithms.
return type: double
code example: e_test.dart

ln10 Constant

description: Natural logarithm of 10.
return type: double
code example: ln10_test.dart

ln2 Constant

description: Natural logarithm of 2.
return type: double
code example: ln2_test.dart

log10e Constant

description: Base-10 logarithm of e.
return type: double
code example: log10e_test.dart

log2e Constant

description: Base-2 logarithm of e.
return type: double
code example: log2e_test.dart

pi Constant

description: The ratio of a circle's circumference to its diameter
return type: double
code example: pi_test.dart
⚠️ **GitHub.com Fallback** ⚠️