A simple equations module made by Tyler, providing geometry-related formulas for perimeters, areas, surface areas, and volumes.
pip install tylereqfrom tylereq import shapes
# Calculate area of a rectangle
area = tylereq.shapes.a_rectangle(5, 3) # Returns 15.0
# Calculate volume of a sphere
volume = tylereq.shapes.v_sphere(2) # Returns 33.510321638291124
# Calculate perimeter of a square
perimeter = tylereq.shapes.p_square(10) # Returns 40tylereq.shapes.p_rectangle(l, w): Rectangle perimetertylereq.shapes.p_square(s): Square perimetertylereq.shapes.p_triangle(a, b, c): Triangle perimetertylereq.shapes.c_circle(r): Circle circumference
tylereq.shapes.a_rectangle(l, w): Rectangle areatylereq.shapes.a_square(s): Square areatylereq.shapes.a_triangle(b, h): Triangle areatylereq.shapes.a_circle(r): Circle area
tylereq.shapes.sa_box(l, w, h): Box surface areatylereq.shapes.sa_sphere(r): Sphere surface areatylereq.shapes.sa_cylinder(r, h): Cylinder surface area
tylereq.shapes.v_box(l, w, h): Box volumetylereq.shapes.v_sphere(r): Sphere volumetylereq.shapes.v_cylinder(r, h): Cylinder volume
Full documentation is available at the project's GitHub Pages site.
This project is licensed under the MIT License - see the LICENSE file for details.