Skip to main content

Written by Steven Byrnes, http://sjbyrnes.com/

Download: https://pypi.python.org/pypi/trianglesolver/ Source code repository: https://github.com/sbyrnes321/trianglesolver

This little package applies the law of sines or cosines to find all the sides and angles of a triangle, if you know some of the sides and/or angles.

The main function defined by this package is solve(…). Simple example:

from math import pi
from trianglesolver import solve
a,b,c,A,B,C = solve(b=7.6, c=8.3, A=pi/3)

Following the usual convention, lower-case letters are side lengths and capital letters are angles. Corresponding letters are opposite each other, e.g. side b is opposite angle B.

All angles are in radians! However, you can use the degree constant to convert:

from trianglesolver import solve, degree
a,b,c,A,B,C = solve(b=7, A=5*degree, B=70*degree)
print(C / degree)

Metadata

Release files for trianglesolver 1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for trianglesolver 1.2
File Size Uploaded
trianglesolver-1.2.tar.gz 4.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for trianglesolver 1.2
File Interpreter ABI Platform
trianglesolver-1.2-py3-none-any.whl Python 3 none any Details

Total release size: 10.1 kB

Release files / trianglesolver-1.2.tar.gz

Download URL trianglesolver-1.2.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
4af18aade579d5c0d64389b3e65aeaf06cff26319762ccd859e3268559a76aea
BLAKE2b-256 checksum
How to use checksums
6f5218f909fcc652b2a4de75a274aa3de0d567a5d592b13d57e65b76c550bdf1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

Release files / trianglesolver-1.2-py3-none-any.whl

Download URL trianglesolver-1.2-py3-none-any.whl
Size 5.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aa0903c3708b4e2b496f06d490cae72c6ff6274b00d1edce420fcfa3b2b76682
BLAKE2b-256 checksum
How to use checksums
ff8e43d45cf3e18e3f455e4b5ab333a7c27b8e38c4e535f7346b7148ce08eb65
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

Release history Release notifications | RSS feed

This release

1.2 This release

2 release files

1.1

1 release file

1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page