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

method i8.wrapping_mul

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

Example:

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

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

С версии. 1.0.0-beta

Параметры

ИмяТип
oi8

Возвращает

i8

Эффекты

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

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

См. также