Difference between revisions of "Category:LSL 浮動小数点数"

From Second Life Wiki
Jump to navigation Jump to search
(Created page with '{{Multi-lang|Category:LSL Float|/ja}} {{LSL Header{{#var:lang}}|ml=*}}{{LSLC{{#var:lang}}|}} {{LSLC{{#var:lang}}|Types}} 浮動小数点数データ型はIEEE-754形式の32ビ...')
 
m (Redirected page to Category:LSL Float/ja)
Tag: New redirect
 
Line 1: Line 1:
{{Multi-lang|Category:LSL Float|/ja}}
#Redirect [[:Category:LSL Float/ja]]
{{LSL Header{{#var:lang}}|ml=*}}{{LSLC{{#var:lang}}|}}
{{LSLC{{#var:lang}}|Types}}
浮動小数点数データ型はIEEE-754形式の32ビット(単精度)の数値です。
小数点付きの数値を使いたいときはfloatを使用します。
 
表現できる範囲は1.175494351E-38 〜 3.402823466E+38です。
 
2.6E-5のような科学的表記で表現することができます。
 
関数が引数としてfloatを要求しているときに、数値が整数(例えば5)ならば、float(例えば5.0)として生成されるように.0を付加します。
 
二つの定数を除算するなら、float型として定義をしないと結果が丸められるでしょう。いっそのこと、電卓であらかじめ計算しておくと、サーバーの数サイクルを節約します。
 
<div id="box">
== 例 ==
<div style="padding: 0.5em">
<lsl>float min = 1.175494351E-38;
float max = 3.402823466E+38;
float sci = 2.6E-5;
float sci_a = 2.6E+3;
float sci_b = 2.6E3;
float sci_c = 26000.E-1;
float f = 2600;//float への暗黙変換
float E = 85.34859;
</lsl>
</div></div>
 
<div id="box">
== 関連項目 ==
<div style="padding: 0.5em">
'''用語'''
*LSL Examples: [[Format_Decimal|Format Decimal]]
 
</div></div>

Latest revision as of 10:34, 26 September 2023

This category currently contains no pages or media.