広告
引数の絶対値を返します。
引数が「float」の場合は返り値も「float」となるが、それ以外は「int」となります。
$lng = -2; $lng = abs($lng); print $lng;
2
https://www.7key.jp/program/php/abs.html