PHP code example of vluzrmos / math-interval-js

1. Go to this page and download the library: Download vluzrmos/math-interval-js 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/ */

    

vluzrmos / math-interval-js example snippets

js
Interval.test(1, "[1,2]");
// true

Interval.test(3, "[1,2]");
// false
js
Interval.test(2, "{1,3,5,7}");
// false

Interval.test(3, "{1,3,5,7}");
// true
js
Interval.test(-2, "[1, Inf)");
// false

Interval.test(400, "[1, Inf)");
// true
js
Interval.test(-2, "(-Inf, Inf)");
// true

Interval.test(1000, "(-Inf, Inf)");
// true
js
Interval.test(-2, "(-2, 2)");
// false

Interval.test(2, "(-2, 2)");
// false

Interval.test(0, "(-2, 2)");
// true

Interval.test(1, "(-2, 2)");
// true