The high/low/avg tan methods only differ in what set of points form the
set of points to sin/cos, and if it should be averaged or not.
Group the implementation into a single tan_method, where the choice of
upper/lower set is done with conditionals. The user-facing interface is
not changed, they simply delegate the work to the tan_method function.
The high/low/avg tan methods only differ in what set of points form the set of points to sin/cos, and if it should be averaged or not.
Group the implementation into a single tan_method, where the choice of upper/lower set is done with conditionals. The user-facing interface is not changed, they simply delegate the work to the tan_method function.