double()
原文
値をdouble浮動小数点データ型に変換します。 次に例を示します。
code:sample.ino
int x = 2;
double d = double(x); // d now holds 2.0, a double value
値xは任意の型の構いません。ただしxが(intやlong longのような)数値でない場合、奇妙な結果が得られます。
Maple(Arduino STM32)のdoubleの精度と制限の詳細については、doubleのリファレンスを参照してください。
関連項目
double
float
float()
License and Attribution: Portions of this page were adapted from the Arduino Reference Documentation, which is released under a Creative Commons Attribution-ShareAlike 3.0 License.
このドキュメントはleafLabs, LLC.が執筆し、たま吉が翻訳・一部加筆修正したものです。
Arduino STM32 リファレンス 日本語版 に戻る