llAbs/ja

From Second Life Wiki
< LlAbs
Revision as of 06:09, 18 December 2015 by Mizu Melody (talk | contribs)
Jump to navigation Jump to search

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

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

さらに複雑な例

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);
    }
}
// 二つ目の例での出力
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 );