absolutevalue/ja: Difference between revisions
Jump to navigation
Jump to search
m (Conversion script moved page Absolutevalue/ja to absolutevalue/ja: Converting page titles to lowercase) |
m (Text replacement - "source>" to "syntaxhighlight>") |
||
Line 7: | Line 7: | ||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
[h: val = absolutevalue(num)] | [h: val = absolutevalue(num)] | ||
</ | </syntaxhighlight> | ||
<!--You can use the following shorthand for this function:-> | <!--You can use the following shorthand for this function:-> | ||
下記の短縮形を使用可能: | 下記の短縮形を使用可能: | ||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
[h: val = abs(num)] | [h: val = abs(num)] | ||
</ | </syntaxhighlight> | ||
|examples= | |examples= | ||
Line 18: | Line 18: | ||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
[r: absolutevalue(-3)] | [r: absolutevalue(-3)] | ||
</ | </syntaxhighlight> | ||
<!--Returns:<source lang="mtmacro" line start=2>3</ | <!--Returns:<source lang="mtmacro" line start=2>3</syntaxhighlight>--> | ||
戻り値:<source lang="mtmacro" line start=2>3</ | 戻り値:<source lang="mtmacro" line start=2>3</syntaxhighlight> | ||
====正の数====<!--Positive Number--> | ====正の数====<!--Positive Number--> | ||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
[r: abs(4)] | [r: abs(4)] | ||
</ | </syntaxhighlight> | ||
<!--Returns:<source lang="mtmacro" line start=2>4</ | <!--Returns:<source lang="mtmacro" line start=2>4</syntaxhighlight>--> | ||
戻り値:<source lang="mtmacro" line start=2>4</ | 戻り値:<source lang="mtmacro" line start=2>4</syntaxhighlight> | ||
====十進数====<!--Decimal Number--> | ====十進数====<!--Decimal Number--> | ||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
[r: abs(3.4)] | [r: abs(3.4)] | ||
</ | </syntaxhighlight> | ||
<!--Returns:<source lang="mtmacro" line start=2>3.4</ | <!--Returns:<source lang="mtmacro" line start=2>3.4</syntaxhighlight>--> | ||
戻り値:<source lang="mtmacro" line start=2>3.4</ | 戻り値:<source lang="mtmacro" line start=2>3.4</syntaxhighlight> | ||
}} | }} | ||
[[Category:Mathematical Function]] | [[Category:Mathematical Function]] | ||
{{Languages|absolutevalue}} | {{Languages|absolutevalue}} |
Revision as of 17:10, 14 March 2023
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>