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 | Provenance | Actions |
|---|---|---|---|---|
| triangles-1.0.0.tar.gz | 3.0 kB | Without provenance | Details for triangles-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| triangles-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for triangles-1.0.0-py3-none-any.whl |
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
|
Security for triangles 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.