CarverMath 5.46.0
Single precision and lookup-table math used by the carvers, with the results of Minecraft's Mth: sin/cos come from a 65536-entry float table indexed by a double scaled angle, and every float operation of the Java code is rounded to float32 with f() (PHP only has doubles; a double result of one +, -, * or / of two float32 values rounds to the same float32 value as the float operation).
Constants
HALF_PI
php
public const HALF_PI = 1.5707963705062866PI
php
public const PI = 3.1415927410125732TWO_PI
php
public const TWO_PI = 6.2831854820251465Methods
cos()
php
public static function cos(float $value) : floatMth.cos(double)
f()
php
public static function f(float $x) : floatRounds to the nearest float32 (Veltkamp splitting, like FloatMath::fround()).
floor()
php
public static function floor(float $value) : intMth.floor(double)
sin()
php
public static function sin(float $value) : floatMth.sin(double)
sinTable()
php
public static function sinTable() : array