Files
mathgenerator/mathgenerator/funcs/geometry/arc_length.py
Luke Weiler 4f21bbd3ab Use latex as default output (#402)
* Improve combine_like_terms

* Lint fix

* add some latex to readme

* give compound_interest latex formatting

* fix compound interest readme

* update combine_like_terms readme

* combine_like_terms add delimiters

* Convert some alebra output to latex

* Add missing right] to latex

* Fix makeReadme script

* Correct det 2x2 latex

* use bmatrix for det 2x2

* update readme and bump version

* Make latex matrix one line

* made latex for most of algebra

* more latex migrations

* convert basic_math to latex

* re-generate readme

* fix double exponent

* latex for most of calculus

* Improved stationary points gen

* made cs latex

* Transform geometry to latex

* texify misc outputs

* texify statistics

* regenerate readme

* Add tex markers to linear_equations

* add list_to_tex for mult_int_22

* upgrade readme

* update list_to_tex

* add end to list_to_tex

* tweak list_to_tex, update readme

* Update README.md

* Update README.md

* lint fixes

* lint fix

* Remove tests

* texify system_of_equations

* update system_of_equations tex

* regen readme

* texify complex_quadratic

* update complex_quadratic

* regen readme

* sqrt to complex_quadratic

* complex_quadratic texify

* Update README.md

* Update README.md

* make latexbuilder

* regen readme

* fix bmatrix

* bmatrix conversions

* update readme

* use times symbol

* improve tex of prod_sci_notations

* Add missing delim to prod of sci notations

* Add missing curly brack to prod-sci-not

* lint fixes

* texify differentiation

* texify stationary points

* changed differentation to trig_differentiation

* texify stationary points

* update readme

* Remove left right from stat_points

* texify angle_btw_vectors

* update readme

* add spaces to mod operator

* Swap \\% with \\percent

* update readme

* Replace //percent with non-math %

* fix leftover \\percent

* latexify vector_cross

* change tex multiply to times

* update readme

* lint fixes

* lint fix
2022-12-23 00:38:59 -05:00

19 lines
622 B
Python

from ...generator import Generator
import random
import math
def gen_func(maxRadius=49, maxAngle=359):
radius = random.randint(1, maxRadius)
angle = random.randint(1, maxAngle)
angle_arc_length = float((angle / 360) * 2 * math.pi * radius)
formatted_float = "{:.5f}".format(angle_arc_length)
problem = f"Given radius, ${radius}$ and angle, ${angle}$. Find the arc length of the angle."
solution = f"Arc length of the angle $= {formatted_float}$"
return problem, solution
arc_length = Generator("Arc length of Angle", 108, gen_func,
["maxRadius=49", "maxAngle=359"])