angle handling in lua