absolutevalue/ja

From RPTools Wiki
Revision as of 17:10, 14 March 2023 by Taustin (talk | contribs) (Text replacement - "source>" to "syntaxhighlight>")
Jump to navigation Jump to search

Languages:  English  • 日本語  • 한국어


absolutevalue() Function

数値の絶対値を返す。数値の絶対値とは、符号を除いた数値のことである。

Usage

<source lang="mtmacro" line> [h: val = absolutevalue(num)] </syntaxhighlight> <source lang="mtmacro" line> [r: absolutevalue(-3)] </syntaxhighlight> 戻り値:<source lang="mtmacro" line start=2>3</syntaxhighlight>

正の数

<source lang="mtmacro" line> [r: abs(4)] </syntaxhighlight> 戻り値:<source lang="mtmacro" line start=2>4</syntaxhighlight>

十進数

<source lang="mtmacro" line> [r: abs(3.4)] </syntaxhighlight> 戻り値:<source lang="mtmacro" line start=2>3.4</syntaxhighlight>

Languages:  English  • 日本語  • 한국어