protected function _odd()
    {
        if((abs($this->value) - floor(abs($this->value))) != 0){
            throw new \RuntimeException(
                'Testing if number is odd or even only if it is an integer!'
            );
        }

        return (boolean) ($this->value & 1);
    }
protected function _odd()
    {
        if((abs($this->value) - floor(abs($this->value))) != 0){
            throw new \RuntimeException(
                'Testing if number is odd or even only if it is an integer!'
            );
        }

        return (boolean) ($this->value & 1);
    }
protected function _odd ( ) { if ( ( abs ( $ this -> value ) - floor ( abs ( $ this -> value ) ) ) != 0 ) { throw new \ RuntimeException ( 'Testing if number is odd or even only if it is an integer!' ) ; } return ( boolean ) ( $ this -> value & 1 ) ; }
Tests whether current number is odd.

Tests whether current integer number is odd or not. If current number is
not an integer, then raises an `\RuntimeException`.

This is used as runtime part of magic getter `S::$odd`.

Example:

$n = new N(3);
$n->odd; // true
$n = new N(4);
$n->odd; // false
$n = new N(3.14);
$n->odd; // raises eception

@see S::$odd The magic getter `S::$odd`
$see S::_even() The opposite implementation for even number
@return boolean
@throws \RuntimeException If current number is not an integer
Tests whether current number is odd .