Difference between revisions of "LlAbs/ja"

From Second Life Wiki
Jump to navigation Jump to search
m (Undo revision 851552 by Mako Nozaki (Talk))
m
Line 1: Line 1:
{{LSL_Function/ja
{{LSL_Function
|func=llAbs
|func=llAbs
|func_id=6|func_sleep=0.0|func_energy=10.0
|func_id=6|func_sleep=0.0|func_energy=10.0

Revision as of 01:47, 14 December 2015

Summary

Function: integer llAbs( integer val );
0.0 Forced Delay
10.0 Energy

Returns an integer val の絶対値

• integer val 何らかの integer 値

Caveats

  • llAbs(-2147483648) の戻り値は -2147483648 になります。これは 2147483648 が有効な integer 値でないためです。

Examples

<lsl>// 簡単な例 default {

   state_entry()
   {
       llSay(0,"The absolute value of -4 is: "+(string)llAbs(-4) );
   }

}</lsl>

<lsl>// さらに複雑な例 ShowAbsolute(integer X) {

   string Message = "llAbs("
       + (string)X
       + ") --> "
       + (string)llAbs(X);
   llSay(PUBLIC_CHANNEL, Message);

} default {

   state_entry()
   {
       ShowAbsolute(-3);
       ShowAbsolute(5);
       ShowAbsolute(-20);
       ShowAbsolute(0);
   }

}</lsl>

// 二つ目の例での出力
Test Object: llAbs(-3) --> 3
Test Object: llAbs(5) --> 5
Test Object: llAbs(-20) --> 20
Test Object: llAbs(0) --> 0

See Also

Functions

•  llFabs llAbs の float

Articles

•  "Wikipedia logo"絶対値

Deep Notes

Signature

function integer llAbs( integer val );