Skip to main content

to_i32

Function to_i32 

Source
pub(crate) fn to_i32(n: f64) -> i32
Expand description

仕様の ToInt32(2^32 での剰余を符号付きにする)。 【2026-11-04】従来は m as i64 as u32 で、絶対値が 2^63 以上の数(2 つの 32 ビット値の積など)が Rust の飽和で i64 の最大値に張り付き、(x * y) | 0 等が JS と違う値になっていた(BotGuard の VM の暗号の計算、TODO B0)。