Difference between revisions of "LlLog10/ja"

From Second Life Wiki
Jump to navigation Jump to search
m (カテゴリ変更)
 
(One intermediate revision by one other user not shown)
Line 8: Line 8:
|caveats=
|caveats=
|constants
|constants
|examples=<lsl>default
|examples=<source lang="lsl2">default
{
{
   state_entry()
   state_entry()
Line 16: Line 16:
     llOwnerSay("The base 10 logarithm of " + (string)num1 + " is " + (string)llLog10(num1));
     llOwnerSay("The base 10 logarithm of " + (string)num1 + " is " + (string)llLog10(num1));
   }
   }
}</lsl>
}</source>
|helpers
|helpers
|also_functions={{LSL DefineRow||[[llLog/ja|llLog]]|}}
|also_functions={{LSL DefineRow||[[llLog/ja|llLog]]|}}
Line 29: Line 29:
|negative_index
|negative_index
|sort=Log10
|sort=Log10
|cat1=Math/ja
|cat1=Math
|cat2
|cat2
|cat3
|cat3
|cat4
|cat4
}}
}}

Latest revision as of 07:21, 25 February 2016

要約

関数: float llLog10( float val );

valが0以下の場合、代わりにzeroを返します。
valの、底が10の"Wikipedia logo"対数を float で返します。

• float val

"Wikipedia logo"自然対数を取得するには、llLogを用います。
llLog10は、底が10の対数が必要とされる場所にのみ使うべきで、 全てのその他のアプリケーションは代わりにllLogを使うべきです。

サンプル

default
{
  state_entry()
  {
    float num1 = llFrand(100.0);

    llOwnerSay("The base 10 logarithm of " + (string)num1 + " is " + (string)llLog10(num1));
  }
}

注意点

llLogllLog10のみ存在します。浮動小数点計算の結果として出力されたエラーは、対数を使用する時にとくに明らかです。 llLogは対数の底辺を変換するときにllLog10の代わりに用いるべきです。 <lsl>float LogBaseN = llLog(value) / llLog(Base); //This technique introduces errors but is the only way</lsl>

関連項目

関数

•  llLog
•  llPow
•  llSqrt

記事

•  "Wikipedia logo"対数

特記事項

Search JIRA for related Issues

Signature

function float llLog10( float val );
この翻訳は 原文 と比べて古いですか?間違いがありますか?読みにくいですか?みんなで 修正 していきましょう! (手順はこちら)
この項目はあなたにとって参考にならない項目ですか?もしかしたらLSL Wikiの関連した項目が参考になるかもしれません。