Skip to content

Mth 5.46.0 ​

final class · pocketmine\world\generator\vanilla\feature\Mth · source

Vanilla's Mth helpers whose exact results matter for worldgen (the float sine table, float lerp).

Constants ​

PI_F ​

php
public const PI_F = 3.1415927410125732

3.1415927F

Methods ​

cos() ​

php
public static function cos(float $x) : float

Mth.cos(double)

lerpF() ​

php
public static function lerpF(float $alpha, float $a, float $b) : float

Mth.lerp(float alpha, float a, float b) in float32

sin() ​

php
public static function sin(float $x) : float

Mth.sin(double): float from the 65536-entry table

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