convert dcosd and dsind into dcos and dsin