diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-04-07 22:43:57 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-04-07 22:43:57 +0900 |
| commit | 20d59037a9e860ec5c114154e47c91fa48a01771 (patch) | |
| tree | a8efecc4cfd11820b0b88a30a329a108265f5d9f | |
| parent | 28b496687c0eb36a035a8686794fa45434957e28 (diff) | |
| download | php-waddiwasi-20d59037a9e860ec5c114154e47c91fa48a01771.tar.gz php-waddiwasi-20d59037a9e860ec5c114154e47c91fa48a01771.tar.zst php-waddiwasi-20d59037a9e860ec5c114154e47c91fa48a01771.zip | |
refactor: rename constant
| -rw-r--r-- | src/BitOps/BinaryConversion.php | 4 | ||||
| -rw-r--r-- | src/BitOps/FloatTraits.php | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/BitOps/BinaryConversion.php b/src/BitOps/BinaryConversion.php index ae4e403..34d4ca6 100644 --- a/src/BitOps/BinaryConversion.php +++ b/src/BitOps/BinaryConversion.php @@ -279,7 +279,7 @@ final readonly class BinaryConversion // Infinity if ($e >= 128) { - return FloatTraits::getF32SignBit($sign) | FloatTraits::F32_INFINITY_BITS; + return FloatTraits::getF32SignBit($sign) | FloatTraits::F32_INFINITY_BIT_PATTERN; } // Mantissa @@ -303,7 +303,7 @@ final readonly class BinaryConversion $e += 1; // Infinity if ($e >= 128) { - return FloatTraits::getF32SignBit($sign) | FloatTraits::F32_INFINITY_BITS; + return FloatTraits::getF32SignBit($sign) | FloatTraits::F32_INFINITY_BIT_PATTERN; } } diff --git a/src/BitOps/FloatTraits.php b/src/BitOps/FloatTraits.php index 75eebcb..31dcd26 100644 --- a/src/BitOps/FloatTraits.php +++ b/src/BitOps/FloatTraits.php @@ -17,7 +17,7 @@ final readonly class FloatTraits public const int F32_SIGN_SIGNED = 0b10000000_00000000_00000000_00000000; public const int F32_EXPONENT_NAN = 0b01111111_10000000_00000000_00000000; - public const int F32_INFINITY_BITS = 0b01111111_10000000_00000000_00000000; + public const int F32_INFINITY_BIT_PATTERN = 0b01111111_10000000_00000000_00000000; public const int F64_EXPONENT_BITS = 11; public const int F64_MANTISSA_BITS = 52; |
