CubicSpline 5.46.0
Cubic (Hermite) spline over a density function coordinate, evaluated in single precision like vanilla (ported from misode/deepslate CubicSpline, MIT). Values are either constants or nested splines.
Properties
$coordinate
php
public readonly \pocketmine\world\generator\vanilla\density\DensityFunction $coordinate$derivatives
php
public readonly array $derivatives$locations
php
public readonly array $locations$maxValue
php
public readonly float $maxValue$minValue
php
public readonly float $minValue$values
php
public readonly array $values$vanillaFloats
php
public static bool $vanillaFloatsVanilla works in float32: the coordinate is read as a float and constant point values are stored as floats. deepslate 0.27.2 keeps both as doubles (1 ulp differences). false = deepslate behaviour, only used to compare against deepslate reference values; it must be set before the graph is parsed.
Methods
__construct()
php
public function __construct(\pocketmine\world\generator\vanilla\density\DensityFunction $coordinate, array $locations, array $values, array $derivatives)compute()
php
public function compute(float $x, float $y, float $z) : floatcoordinates()
php
public function coordinates() : array