Skip to content

UnaryFunction 5.46.0 ​

final class · pocketmine\world\generator\vanilla\density\UnaryFunction · source

Extends DensityFunction

Single-input transforms: abs, square, cube, half_negative, quarter_negative, squeeze, negate, sqrt, log, sign, reciprocal.

Constants ​

ABS ​

php
public const ABS = "abs"

CUBE ​

php
public const CUBE = "cube"

HALF_NEGATIVE ​

php
public const HALF_NEGATIVE = "half_negative"

LOG ​

php
public const LOG = "log"

NEGATE ​

php
public const NEGATE = "negate"

QUARTER_NEGATIVE ​

php
public const QUARTER_NEGATIVE = "quarter_negative"

RECIPROCAL ​

php
public const RECIPROCAL = "reciprocal"

SIGN ​

php
public const SIGN = "sign"

SQRT ​

php
public const SQRT = "sqrt"

SQUARE ​

php
public const SQUARE = "square"

SQUEEZE ​

php
public const SQUEEZE = "squeeze"

Properties ​

$input ​

php
public readonly \pocketmine\world\generator\vanilla\density\DensityFunction $input

$op ​

php
public readonly string $op

Methods ​

__construct() ​

php
public function __construct(string $op, \pocketmine\world\generator\vanilla\density\DensityFunction $input)

apply() ​

php
public static function apply(string $op, float $d) : float

children() ​

php
public function children() : array

compute() ​

php
public function compute(float $x, float $y, float $z) : float

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.