File: mathematical.py

package info (click to toggle)
python-quantities 0.16.1-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 864 kB
  • sloc: python: 8,006; makefile: 72; sh: 3
file content (16 lines) | stat: -rw-r--r-- 258 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import math as _math

from ..unitquantity import UnitConstant


pi = UnitConstant(
    'pi',
    _math.pi,
    u_symbol='π'
)
golden = golden_ratio = UnitConstant(
    'golden_ratio',
    (1 + _math.sqrt(5)) / 2,
    u_symbol='ϕ',
    aliases=['golden']
)