Triangles
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.
- The length of 2 adjacent sides and their interior angle (SAS)
- The value of 2 angles and the length of the common side (ASA)
- 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)
Metadata
Release files for triangles 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| triangles-1.0.0.tar.gz | 3.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| triangles-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.4 kB
Release files / triangles-1.0.0.tar.gz
| Download URL | triangles-1.0.0.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4317f660e8a114ab827351fb1f2925ed7a7b0f0cb9d6555f1337c0ebdd07d807
|
|
BLAKE2b-256 checksum How to use checksums |
4a87312d285c3d91b60bdfad0b1bde3c1baec3b7bb8eb0a7f6a6b3f07509826e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.8.10
|
Release files / triangles-1.0.0-py3-none-any.whl
| Download URL | triangles-1.0.0-py3-none-any.whl |
|---|---|
| Size | 3.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8981e806baf2bc7683fd917992b21bc8cda9978d7f7777a64ec7a9424359732e
|
|
BLAKE2b-256 checksum How to use checksums |
ac7f0205c94cd81a8d625ac3c53f7f4640d46bdf928942fe8ff7cecf1a36bd24
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.8.10
|