2010年5月30日日曜日

Square root (Memo/note)

Square root


√ is expressed by the symbol sqrt


Therefore, in the program, it will be like following.

/*

  |\

  |    \   c

a|       \

  | ____\

       b

*/

int a, b, c;

c = sqrt(a*a+b*b);


1 件のコメント:

  1. I use sources for Java.
    Therefore, I am not sure it is compatible with Arduino.
    But there are many similarity between Java and Arduino and I think it is very useful to check the web page of Java tutorial.

    返信削除