improve documentation
use doctest for testing angle_2d()
fix critical bug in overflow compensation
add tests for tri_area()
add tests for gen_mask()
add tests for build_tuple_seq()