Skip to content

Commit

Permalink
feat: add Area
Browse files Browse the repository at this point in the history
  • Loading branch information
unexcellent committed Nov 8, 2024
1 parent 7fa0bd5 commit 55682aa
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions quantio/quantities.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@
from ._quantity_base import _QuantityBase


class Area(_QuantityBase):
"""The two-dimensional extent of an object."""

_UNIT_CONVERSION: dict[str, float] = {
"square_miles": 1609.34**2,
"square_kilometers": 10 ** (3 * 2),
"square_meters": 10**0,
"square_feet": 0.3048**2,
"square_inches": 0.0254**2,
"square_centimeters": 10 ** (-2 * 2),
"square_millimeters": 10 ** (-3 * 2),
"square_micrometers": 10 ** (-6 * 2),
}


class Length(_QuantityBase):
"""The one-dimensional extent of an object or the distance between two points."""

Expand Down

0 comments on commit 55682aa

Please sign in to comment.