如图所示,怎么样计算出角度A和角度B的角度值?


解决方案
50
a = Math.Atan2(10-5, 2-1); b = Math.Atan2(20-10, 3-2);
100
double a = Math.Atan2(5, 1) * (180 / Math.PI);
double b = Math.Atan2(10, 1) * (180 / Math.PI);
double b = Math.Atan2(10, 1) * (180 / Math.PI);
a,b的单位为度。
不过,你的纵横坐标单位不一致,需要你本人考虑了。
50
是atan没错
sin是竖着的边比上蓝色的边,具体可以参考任意一本初二的数学课本