Skip to main content

Advanced geometry calculations library

Project description

Geometry Calculator

A Python library for calculating areas of geometric shapes with additional features.

Features

  • Calculate area of circle by radius
  • Calculate area of triangle by three sides
  • Check if triangle is right-angled
  • Easy to extend with new shapes
  • Polymorphic area calculation

Installation

pip install geometry-calculator

Usage

from geometry_calculator import Circle, Triangle, calculate_area, is_right_angled

# Circle example
circle = Circle(5)
print(calculate_area(circle))  # 78.53981633974483

# Triangle example
triangle = Triangle(3, 4, 5)
print(calculate_area(triangle))  # 6.0
print(is_right_angled(triangle))  # True

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

geometry_calculator-0.1.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

geometry_calculator-0.1.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file geometry_calculator-0.1.0.tar.gz.

File metadata

  • Download URL: geometry_calculator-0.1.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for geometry_calculator-0.1.0.tar.gz
Algorithm Hash digest
SHA256 698eab454ab111c65e13201acb8c2e70c1b32d1e1ebdbc29d2f1e7b44f97ff9b
MD5 c02444c3492c405b2bfbb131aed238e6
BLAKE2b-256 8a9f6510c241b57ecd4297559da961547fd3daabb84957ff361c4bf50bafcc55

See more details on using hashes here.

File details

Details for the file geometry_calculator-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for geometry_calculator-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 033a0c07cc19d028c3e55a31ba9f1e983eb6b1c6d5c86463590e6670056ec818
MD5 3856b6aee543927549ae3ce943c89252
BLAKE2b-256 1ef5eccaadb087d2b94d2ac21d3b7be4f4250eb2ec46f99015d30f51cd0510be

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page