Can compare two float values

@link http://php.net/manual/en/language.types.float.php
@param float $x
@param float $y
@param float $precision
@return bool
516562
public static function isFloatEqual($x, $y, $precision = 0.0000001) {
		return ($x + $precision >= $y) && ($x - $precision <= $y);
	}
1258808
public function addPoint($X, $Y, $Value, $Force = true)
    {
        if ($X < 0 || $X > $this->GridSizeX) {
            return 0;
        }
        if ($Y < 0 || $Y > $this->GridSizeY) {
            return 0;
        }

        if ($this->Points[$X][$Y] == UNKNOWN || $Force) {
            $this->Points[$X][$Y] = $Value;
        } elseif ($this->Points[$X][$Y] == UNKNOWN) {
            $this->Points[$X][$Y] = $Value;
        } else {
            $this->Points[$X][$Y] = ($this->Points[$X][$Y] + $Value) / 2;
        }
    }
135143
protected function div($left, $right, $precision)
    {
        if (is_null($precision)) return $left / $right;
        return floatval(\bcdiv($left, $right, $precision));
    }
888421
public boolean hasVertex(float x, float y) {    	
    	if (points.length == 0) {
    		return false;
    	}
    	
    	checkPoints();
    	
    	for (int i=0;i<points.length;i+=2) {
    		if ((points[i] == x) && (points[i+1] == y)) {
    			return true;
    		}
    	}
    	
    	return false;
    }
730978
public int getNoxItemHit(float x, float y) {
    int noxItemPosition = -1;
    for (int i = 0; i < getNumberOfElements(); i++) {
      float noxItemX = getXForItemAtPosition(i) + offsetX;
      float noxItemY = getYForItemAtPosition(i) + offsetY;
      float itemSize = getNoxItemSize();
      boolean matchesHorizontally = x >= noxItemX && x <= noxItemX + itemSize;
      boolean matchesVertically = y >= noxItemY && y <= noxItemY + itemSize;
      if (matchesHorizontally && matchesVertically) {
        noxItemPosition = i;
        break;
      }
    }
    return noxItemPosition;
  }
749675
public static function isFloat($float): bool
    {
        if (!\is_scalar($float)) {
            return false;
        }

        return (string)((float)$float) === (string)$float;
    }
931778
private static function toFloat($x)
    {
        if (is_float($x)) return $x;
        if (is_int($x)) return $x;
        if (is_string($x)) {
            $r = Rational::parse($x);
            return $r->p/$r->q;
        }
        throw new SyntaxErrorException();
    }
93938
public static function equal( $a, $b, int $precision = 0 ): bool {
    return self::write( $a, $precision ) === self::write( $b, $precision );
  }
534302
private static function modulo($x, $y)
    {
        return ($x < $y ? $x : (is_int($y) ? $x % $y : fmod($x, $y))) + ($x < 0 ? $y : 0);
    }
412179
private function round_($result, $precision) {
        if (abs($result) === INF) {
            return $result;
        }
        $str = strtolower((string) $result);
        if (strpos($str, 'e') !== false) {
            $r = explode('e', $str);
            $left = round((float) $r[0], (int) $precision);
            $right = $r[1];
            return (float) ($left.'e'.$right);
        }
        return round($result, (int) $precision);
    }
863325
public static function round($op1, $precision = 0)
    {
        if (self::$_bcmathDisabled) {
            $op1 = round($op1, $precision);
            if (strpos((string) $op1, 'E') === false) {
                return self::normalize(round($op1, $precision));
            }
        }

        if (strpos($op1, 'E') !== false) {
            $op1 = self::floatalize($op1);
        }

        $op1    = trim(self::normalize($op1));
        $length = strlen($op1);
        if (($decPos = strpos($op1, '.')) === false) {
            $op1 .= '.0';
            $decPos = $length;
            $length += 2;
        }
        if ($precision < 0 && abs($precision) > $decPos) {
            return '0';
        }

        $digitsBeforeDot = $length - ($decPos + 1);
        if ($precision >= ($length - ($decPos + 1))) {
            return $op1;
        }

        if ($precision === 0) {
            $triggerPos = 1;
            $roundPos   = -1;
        } elseif ($precision > 0) {
            $triggerPos = $precision + 1;
            $roundPos   = $precision;
        } else {
            $triggerPos = $precision;
            $roundPos   = $precision -1;
        }

        $triggerDigit = $op1[$triggerPos + $decPos];
        if ($precision < 0) {
            // zero fill digits to the left of the decimal place
            $op1 = substr($op1, 0, $decPos + $precision) . str_pad('', abs($precision), '0');
        }

        if ($triggerDigit >= '5') {
            if ($roundPos + $decPos == -1) {
                return str_pad('1', $decPos + 1, '0');
            }

            $roundUp = str_pad('', $length, '0');
            $roundUp[$decPos] = '.';
            $roundUp[$roundPos + $decPos] = '1';

            if ($op1 > 0) {
                if (self::$_bcmathDisabled) {
                    return Zend_Locale_Math_PhpMath::Add($op1, $roundUp, $precision);
                }
                return self::Add($op1, $roundUp, $precision);
            } else {
                if (self::$_bcmathDisabled) {
                    return Zend_Locale_Math_PhpMath::Sub($op1, $roundUp, $precision);
                }
                return self::Sub($op1, $roundUp, $precision);
            }
        } elseif ($precision >= 0) {
            return substr($op1, 0, $decPos + ($precision ? $precision + 1: 0));
        }

        return (string) $op1;
    }
782766
public boolean contains(float x, float y) 
    { 
        float xDelta = x - getCenterX(), yDelta = y - getCenterY();
        return xDelta * xDelta + yDelta * yDelta < getRadius() * getRadius();
    }
439637
public static function inferDecimals( $value, $precision )
	{
		if ( is_string( $value ) )
		{
			// BMS 2017-08-22 	Removed this line because functions test 80154 V-05 fails
			//					and none of the XBRL 2.1 conformance tests seem to touch it.
			// $value = trim( $value, "0 " );

			if ( $value == 'INF' ) return "INF";
			$value = intval( $value );
		}

		// BMS 2017-12-18 Changed test to use ===
		if ( $value == 0 || $precision === "INF" ) return INF;
		if ( $precision == 0 ) return false;

		return $precision - intval( floor( log10( abs( $value ) ) ) ) - 1;
	}
421528
public function setAllowAspectRatio($x, $y)
    {
        $this->allowAspectRatioX = (int)$x;
        $this->allowAspectRatioY = (int)$y;

        return $this;
    }
902545
function equals($x)
    {
        switch (MATH_BIGINTEGER_MODE) {
            case self::MODE_GMP:
                return gmp_cmp($this->value, $x->value) == 0;
            default:
                return $this->value === $x->value && $this->is_negative == $x->is_negative;
        }
    }
1158477
public function getY() : ?float 
    {
        if ( ! $this->hasY()) {
            $this->setY($this->getDefaultY());
        }
        return $this->y;
    }
221690
public static function assertIsFloat($variable, Throwable $exception): bool
    {
        static::makeAssertion(\is_float($variable), $exception);
        return true;
    }