Skip to main content

Module java_math

Module java_math 

Expand description

Native engine Java Math paths. Results can differ by machine as vanilla’s do. On wasm use strict_math; java_math calls are unavailable there. Engine paths used by vanilla Math call sites, including machine-dependent rounding. These mirror horizon_core::jmath; they are not a promise of universal HotSpot bit equality. Use strict_math for established portable StrictMath operations.

Functions§

acos
Math.acos.
asin
Math.asin.
atan
Math.atan.
atan2
Math.atan2.
cbrt
Math.cbrt.
cos
Math.cos.
exp
Math.exp.
hypot
Math.hypot.
log
Math.log.
log10
Math.log10.
pow
Math.pow.
round
Math.round(double): the nearest long, ties toward positive infinity (so -2.5 is -2), saturating, NaN is 0.
round_f32
Math.round(float): the int closest to a, ties toward positive infinity (so -2.5 is -2); NaN is 0, and values beyond the int range give i32::MIN or i32::MAX.
sin
Math.sin.
tan
Math.tan.