开发者

Find the slope for 2 known variables?

开发者 https://www.devze.com 2023-03-12 19:29 出处:网络
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

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

精彩评论

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