File: mathematical.py

package info (click to toggle)
python-quantities 0.12.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 828 kB
  • sloc: python: 9,127; makefile: 72; sh: 3
file content (18 lines) | stat: -rw-r--r-- 281 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# -*- coding: utf-8 -*-

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'
)