开发者

Find the slope for 2 known variables?

Couldn't find anything really useful for my needs. So if I already know my 2 variables x(Rise) and y(Run), and I want the slope in degrees, what is the best way to go about coding this? And how would you开发者_Python百科 format a textfield for the answer?


simplest is just to use

double slope = atan2(rise, run)*180/M_PI_2;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜