PHP code example of nsfisis / next-after
1. Go to this page and download the library: Download nsfisis/next-after library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
nsfisis / next-after example snippets
use Nsfisis\NextAfter\NextAfter;
// Get the next representable float after 1.0.
$next = NextAfter::nextAfter(1.0, 2.0); // => 1.0000000000000002
// Get the next float toward positive infinity.
$up = NextAfter::nextUp(1.0); // => 1.0000000000000002
// Get the next float toward negative infinity.
$down = NextAfter::nextDown(1.0); // => 0.9999999999999999