OxL Справочник OxL
РусскийEnglish

method i128.wrapping_mul

Multiplication that wraps around at the bounds of the type instead of panicking.

Example:

oxl✓ проверяется в CI
fn main() io {
  let max: i128 = 170141183460469231731687303715884105727
  let min: i128 = -170141183460469231731687303715884105728
  print("{max.wrapping_mul(2)}")
}
Вывод
-2
pub(api) fn wrapping_mul(o: i128) -> i128

Сложность. O(1).

С версии. 1.0.0-beta

Параметры

ИмяТип
oi128

Возвращает

i128

Эффекты

не объявлены (чистая, пока тело не говорит иное)

Определено в: std/core/numbers.oxl:1850

См. также