Timeline for What's the difference between pow and sqrt in this code?
Current License: CC BY-SA 3.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 31, 2016 at 21:46 | vote | accept | Marc | ||
Jan 30, 2016 at 4:11 | answer | added | Nick Gammon♦ | timeline score: 1 | |
S Oct 22, 2015 at 21:04 | history | suggested | Greenonline | CC BY-SA 3.0 |
Fixed minor typos
|
Oct 20, 2015 at 8:35 | comment | added | Gerben |
Your parentheses are wrong. Change pow(( to pow( .
|
|
Oct 20, 2015 at 7:40 | comment | added | Marc | @Gerben Do you know why im getting this error? In function 'void loop()': error: too few arguments to function 'double pow(double, double)' GettingValues:41: error: at this point in file error: too many arguments to function 'double square(double)' GettingValues:42: error: at this point in file error: too many arguments to function 'double square(double)' | |
Oct 19, 2015 at 16:13 | comment | added | CharlieHanson | @Gerben That should be an answer, n'est pas? | |
Oct 19, 2015 at 15:59 | review | Suggested edits | |||
S Oct 22, 2015 at 21:04 | |||||
Oct 19, 2015 at 12:16 | comment | added | Gerben |
pow(x, 2) is the second power, so x² or x*x. sqrt(x) is the square root of x, so $\sqrt x$. A whole circle is 360 degrees or 2π when measuring in radians. So this ratio of 180/3.141592 is used to convert an angle in radians to an angle in degrees.
|
|
Oct 19, 2015 at 10:45 | review | First posts | |||
Oct 19, 2015 at 15:59 | |||||
Oct 19, 2015 at 10:40 | history | asked | Marc | CC BY-SA 3.0 |