solve x=d/(d-(sin(a)*w)) * cos(a)*w for a