« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 10 of about 13 for Rounding (0.002 sec.)
Imagick::roundCorners — 画像の角を丸める | PHP 8.3 11560
Imagick::roundCorners (PECL imagick 2, PECL imagick 3) Imagick::roundCorners — 画像の角を丸める 警告 この関数は Imagick 3.4.4 以降では 非推奨 になりました。この関数に依存したコードを書くのはやめましょう。 説明 public function Imagick::round ... Corners ( float $x_rounding , float $y_rounding , float $stroke_width = 10 , float $displace = 5 , float $size_correction = -6 ): bool 画像の角を丸めま ... 可能です。 このメソッドは、ImageMagick バージョン 7.0.0 以降で Imagick をコンパイルした場合には利用できません。 パラメータ x_rounding x 方向の丸め。 y_rounding y 方向の丸め。 stroke_width 線幅。 displace image displace size_correction サイズ補正。 戻り値 成 ...
https://man.mtool.work/php/8.3/imagick.roundcorners.html
ImagickDraw::roundRectangle — 角が丸い矩形を描画する | PHP 8.3 11401
ImagickDraw::roundRectangle (PECL imagick 2, PECL imagick 3) ImagickDraw::roundRectangle — 角が丸い矩形を描画する 説明 public function ImagickDraw::roundRectangle ( float $top_left_x , float $top_left_y , float $bottom_right_x , float $bott ... om_right_y , float $rounding_x , float $rounding_y ): bool 警告 この関数は、 現在のところ詳細な情報はありません。引数のリストのみが 記述されています。 ... x 左上の角の x 座標。 top_left_y 左上の角の y 座標。 bottom_right_x 右下の角の x 座標。 bottom_right_y 右下の角の y 座標。 rounding_x x 方向の丸め。 rounding_y y 方向の丸め。 戻り値 値を返しません。 例 例1 ImagickDraw::roundRectangle() の例 <?php functio ...
https://man.mtool.work/php/8.3/imagickdraw.roundrectangle.html
NumberFormatter::setAttribute — 属性を設定する | PHP 8.3 10962
NumberFormatter::setAttribute numfmt_set_attribute (PHP 5 >= 5.3.0, PHP 7, PHP 8, PECL intl >= 1.0.0) NumberFormatter::setAttribute -- numfmt_set_attribute — 属性を設定する 説明 オブジェクト指向型 public function NumberFormatter::setAttribu ... 4567890000 ). "\n" ; ?> 上の例の出力は以下となります。 Digits: 3 1.234.567,891 Digits: 2 1.234.567,89 例3 NumberFormatter::ROUNDING_MODE を使って値を切り捨てる デフォルトでは、 NumberFormatter は値を丸めます。 NumberFormatter::ROUNDING_MODE に NumberForm ... r ( 'en_US' , NumberFormatter :: DECIMAL ); $fmt -> setAttribute ( NumberFormatter :: FRACTION_DIGITS , 2 ); echo "Default rounding mode:\n" ; echo $fmt -> format ( 3.789 ), "\n" ; // 3.79 (rounded up) echo $fmt -> format ( 3.781 ), "\n" ; // 3.78 (round ... ed down) $fmt -> setAttribute ( NumberFormatter :: ROUNDING_MODE , NumberFormatter :: ROUND_DOWN ); echo "\nWith ROUND_DOWN (truncate):\n" ; echo $fmt -> format ( 3.789 ), "\n" ; // ...
https://man.mtool.work/php/8.3/numberformatter.setattribute.html
gmp_div_r — 除算の余りを計算する | PHP 8.3 9800
gmp_div_r (PHP 4 >= 4.0.4, PHP 5, PHP 7, PHP 8) gmp_div_r — 除算の余りを計算する 説明 function gmp_div_r ( GMP | int | string $num1 , GMP | int | string $num2 , int $rounding_mode = GMP_ROUND_ZERO ): resource num1 を num2 で整数として割った ... 釈可能な string 。 文字列の場合、 gmp_init() で基数を自動検出するとき ( base に 0 を指定したとき) と同じ方法で解釈されます。 rounding_mode 引数 rounding_mode の説明については、関数 gmp_div_q() を参照ください。 戻り値 余りを GMP 数で返します。 例 例1 gmp_di ...
https://man.mtool.work/php/8.3/function.gmp-div-r.html
gmp_div_qr — 除算を行い、商と余りを得る | PHP 8.3 9659
gmp_div_qr (PHP 4 >= 4.0.4, PHP 5, PHP 7, PHP 8) gmp_div_qr — 除算を行い、商と余りを得る 説明 function gmp_div_qr ( GMP | int | string $num1 , GMP | int | string $num2 , int $rounding_mode = GMP_ROUND_ZERO ): array この関数は、 num1 を num2 ... 釈可能な string 。 文字列の場合、 gmp_init() で基数を自動検出するとき ( base に 0 を指定したとき) と同じ方法で解釈されます。 rounding_mode 引数 rounding_mode の説明については、 gmp_div_q() 関数を参照ください。 戻り値 配列を返します。配列の最初の要素は [n/d ...
https://man.mtool.work/php/8.3/function.gmp-div-qr.html
gmp_div_q — 数値を除算する | PHP 8.3 8920
gmp_div_q (PHP 4 >= 4.0.4, PHP 5, PHP 7, PHP 8) gmp_div_q — 数値を除算する 説明 function gmp_div_q ( GMP | int | string $num1 , GMP | int | string $num2 , int $rounding_mode = GMP_ROUND_ZERO ): GMP num1 を num2 で割り、 結果を整数で返します ... 釈可能な string 。 文字列の場合、 gmp_init() で基数を自動検出するとき ( base に 0 を指定したとき) と同じ方法で解釈されます。 rounding_mode 結果の丸め方は rounding_mode で指定し、次の値を指定可能です。 GMP_ROUND_ZERO : 結果は 0 の方に丸められます。 GMP_ROUN ...
https://man.mtool.work/php/8.3/function.gmp-div-q.html
bcround — 任意精度数値を丸める | PHP 8.3 8340
bcround (PHP 8 >= 8.4.0) bcround — 任意精度数値を丸める 説明 function bcround ( string $num , int $precision = 0 , RoundingMode $mode = RoundingMode::HalfAwayFromZero ): string num を、指定した precision (小数点以下の桁数)に丸めた値を返しま ... 近い10の倍数に、 precision が -2 の場合は 一番近い100の倍数に丸められる、という具合です。 mode 指定する丸めモード。詳しくは RoundingMode を参照してください。 戻り値 num を指定された精度へ丸めた数値を表す文字列を返します。 エラー / 例外 この関数は、以下の場 ... "123.5" string(3) "123" string(3) "120" string(3) "100" string(1) "0" 例3 bcround() で異なる mode を指定した例 <?php echo 'Rounding modes with 9.5' . PHP_EOL ; var_dump ( bcround ( '9.5' , 0 , RoundingMode :: HalfAwayFromZero )); var_dump ( bcround ( '9. ... 5' , 0 , RoundingMode :: HalfTowardsZero )); var_dump ( bcround ( '9.5' , 0 , RoundingMode :: HalfEven )); var_dump ( bcround ( '9.5' , 0 , ...
https://man.mtool.work/php/8.3/function.bcround.html
round — 浮動小数点数を丸める | PHP 8.3 8340
round (PHP 4, PHP 5, PHP 7, PHP 8) round — 浮動小数点数を丸める 説明 function round ( int | float $num , int $precision = 0 , int | RoundingMode $mode = RoundingMode::HalfAwayFromZero ): float num を、指定した precision (小数点以下の桁数)に ... n が -1 の場合、 num は 一番近い10の倍数に、 precision が -2 の場合は 一番近い100の倍数に丸められる、という具合です。 mode RoundingMode もしくは次の定数のいずれかを使って、丸めのモードを指定します。 定数 説明 PHP_ROUND_HALF_UP 端数が5(半分)の場合、 num を ... 合、 num をもっとも近い奇数に丸めます。 1.5 は 1 に、そして 2.5 は 3 になります。 ただし、新規に追加されたいくつかのモードは RoundingMode にのみ存在します。 戻り値 precision で与えられた精度に丸められた値を float で返します。 エラー / 例外 この関数は、無効 ... 下となります。 float(135.79) float(135.79) float(135.8) float(136) float(140) float(100) float(0) 例3 mode の例 <?php echo 'Rounding modes with 9.5' . PHP_EOL ; var_dump ( round ( 9.5 , 0 , PHP_ROUND_HALF_UP )); var_dump ( round ( 9.5 , 0 , PHP_ROUND_HALF ...
https://man.mtool.work/php/8.3/function.round.html
NumberFormatter クラス | PHP 8.3 8041
NumberFormatter クラス (PHP 5 >= 5.3.0, PHP 7, PHP 8, PECL intl >= 1.0.0) はじめに プログラムで数値を保存したり操作したりする際には、 ロケールに依存しないバイナリ表現を使用します。 数値を表示するときに、ロケールにあわせた文字列形式に変換しま ... IGITS ; public const int FRACTION_DIGITS ; public const int MULTIPLIER ; public const int GROUPING_SIZE ; public const int ROUNDING_MODE ; public const int ROUNDING_INCREMENT ; public const int FORMAT_WIDTH ; public const int PADDING_POSITION ; public co ... t 小数部の桁数 NumberFormatter::MULTIPLIER int 乗数 NumberFormatter::GROUPING_SIZE int グループ化のサイズ NumberFormatter::ROUNDING_MODE int 丸めモード NumberFormatter::ROUNDING_INCREMENT int 切り上げ NumberFormatter::FORMAT_WIDTH int format() の出力のパ ... _SYMBOL int 金額のグループ区切り文字 丸めモード numfmt_get_attribute() および numfmt_set_attribute() で、 NumberFormatter::ROUNDING_MODE 属性に使用する丸めモードの値です。 NumberFormatter::ROUND_AWAY_FROM_ZERO NumberFormatter::ROUND_UP のエイリアス Numbe ...
https://man.mtool.work/php/8.3/class.numberformatter.html
BcMath\Number::round — 任意精度数値を丸める | PHP 8.3 7900
BcMath\Number::round (PHP 8 >= 8.4.0) BcMath\Number::round — 任意精度数値を丸める 説明 public function BcMath\Number::round ( int $precision = 0 , RoundingMode $mode = RoundingMode::HalfAwayFromZero ): BcMath\Number $this を、指定した preci ... 近い10の倍数に、 precision が -2 の場合は 一番近い100の倍数に丸められる、という具合です。 mode 指定する丸めモード。詳しくは RoundingMode を参照してください。 戻り値 結果を新しい BcMath\Number オブジェクトとして返します。 エラー / 例外 このメソッドは、無効 ... )#8 (2) { ["value"]=> string(1) "0" ["scale"]=> int(0) } 例3 BcMath\Number::round() で異なる mode を指定した例 <?php echo 'Rounding modes with 9.5' . PHP_EOL ; $number = new BcMath\Number ( '9.5' ); var_dump ( $number -> round ( 0 , RoundingMode :: HalfA ... wayFromZero ), $number -> round ( 0 , RoundingMode :: HalfTowardsZero ), $number -> round ( 0 , RoundingMode :: HalfEven ), $number -> round ( 0 , RoundingMode :: HalfOd ...
https://man.mtool.work/php/8.3/bcmath-number.round.html
PREV 1 2 NEXT