Skip to main content

A solver for triangle sides and angles

Project description

Triangles

Version Author

Overview

Using the Law of Cosines and the Law of Sines, this library can be used to calculate all remaining sides and angles of a triangle when any one of the following sets of inputs are available.

  1. The length of 2 adjacent sides and their interior angle (SAS)
  2. The value of 2 angles and the length of the common side (ASA)
  3. The lengths of all 3 sides of the triangle (SSS)

Installation

pip install triangles

Usage

Import the module

from triangles import triangles

Use the functions to calculate the sides and angles of a triangle

>>> triangles.SSS(1,1,1)
(1, 1, 1, 60.00000000000001, 59.99999999999999, 60.00000000000001)

>>> triangles.SAS(1,60,1)
(1, 1, 0.9999999999999999, 60.00000000000001, 60.00000000000001, 60)

>>> triangles.ASA(60,1,60)
(1.0, 1.0, 1, 60, 60, 60)

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

triangles-1.0.0.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

triangles-1.0.0-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file triangles-1.0.0.tar.gz.

File metadata

  • Download URL: triangles-1.0.0.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.10

File hashes

Hashes for triangles-1.0.0.tar.gz
Algorithm Hash digest
SHA256 4317f660e8a114ab827351fb1f2925ed7a7b0f0cb9d6555f1337c0ebdd07d807
MD5 9223cb0990ba5b7d9430d0dbb387b85a
BLAKE2b-256 4a87312d285c3d91b60bdfad0b1bde3c1baec3b7bb8eb0a7f6a6b3f07509826e

See more details on using hashes here.

File details

Details for the file triangles-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: triangles-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.10

File hashes

Hashes for triangles-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8981e806baf2bc7683fd917992b21bc8cda9978d7f7777a64ec7a9424359732e
MD5 ecf353d80ad3fd2338737916411702dd
BLAKE2b-256 ac7f0205c94cd81a8d625ac3c53f7f4640d46bdf928942fe8ff7cecf1a36bd24

See more details on using hashes here.

Supported by

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