{@inheritdoc}

@return float
352122
public function apply(\Iterator $set)
    {
        $data = iterator_to_array($set);

        if (count($data) === 0) {
            return 0;
        }

        return array_sum($data) / count($data);
    }
785472
public function castFloat()
    {
        $castFunction = function ($value) {
            return (float) $value;
        };

        if (is_numeric($this->value)) {
            return $castFunction($this->value);
        }

        return $this->handleMismatch($castFunction, 'double');
    }
906931
private function compare_float( $a, $b ) {
		$a = number_format( $a, 4 );
		$b = number_format( $b, 4 );
		if ( 0 === $a - $b ) {
			return 0;
		} elseif ( $a - $b < 0 ) {
			return -1;
		} else {
			return 1;
		}
	}
320967
public function purityIncrease() : float
    {
        $impurity = $this->impurity;

        if ($this->left instanceof Purity) {
            $impurity -= $this->left->impurity()
                * ($this->left->n() / $this->n);
        }

        if ($this->right instanceof Purity) {
            $impurity -= $this->right->impurity()
                * ($this->right->n() / $this->n);
        }

        return $impurity;
    }
241990
public function getFloatMajor()
    {
        if ($this->startsWith($this->major, '0'))
            return (float) ('0.'.substr($this->major, 1));
        return (float) $this->major;
    }
578556
public function getLength() : ?float 
    {
        if ( ! $this->hasLength()) {
            $this->setLength($this->getDefaultLength());
        }
        return $this->length;
    }
872978
public function mean(): float
    {
        $a = $this->a;
        $b = $this->b;

        return ($a + $b) / 2;
    }
10131
public function getFloat($key)
	{
		$resolved = false;
		$value = $this->getByKey($key, $this->data, $resolved);
		
		if($resolved)
		{
			return floatval($value);
		}
		
		if(func_num_args() > 1)
		{
			return func_get_arg(1);
		}
		
		throw new \OutOfBoundsException('Configuration setting not found: "' . $key . '"');
	}
847654
public static function toFloat($o) : ?float
    {
        $o = self::toNumber($o);

        if (is_numeric($o) === true) {
            return floatval($o);
        }

        return $o;
    }
569719
public function longitude(): float
    {
        if (preg_match('/\n4 LONG (.+)/', $this->gedcom, $match)) {
            $gedcom_service = new GedcomService();

            return $gedcom_service->readLongitude($match[1]);
        }

        return 0.0;
    }
15902
public function getLatitude() : ?float 
    {
        if ( ! $this->hasLatitude()) {
            $this->setLatitude($this->getDefaultLatitude());
        }
        return $this->latitude;
    }
828393
public function length(): float
    {
        if ($this->length === 0) {
            $this->length = $this->recomputeLength();
        }

        return $this->length;

    }
1110019
public function getZ() : ?float 
    {
        if ( ! $this->hasZ()) {
            $this->setZ($this->getDefaultZ());
        }
        return $this->z;
    }
827482
public static function float(&$value, $options = ['max'=>null, 'min'=>null, 'default'=>null])
    {
        $value = (float)$value;
        self::processNum($value, $options);
        return $value;
    }
638094
public function getRank() : ?float 
    {
        if ( ! $this->hasRank()) {
            $this->setRank($this->getDefaultRank());
        }
        return $this->rank;
    }
1117079
public function getAndSet(float $value): float
    {
        return floatval($this->handle->getSet($this->name, strval($value)));
    }
436003
public function getWeight() : ?float 
    {
        if ( ! $this->hasWeight()) {
            $this->setWeight($this->getDefaultWeight());
        }
        return $this->weight;
    }