Spec-Zone.ru › Dart 2

dart:core

метод оператора ~/

Duration operator ~/(
  1. int quotient
)

Делит эту продолжительность на заданное quotient и возвращает усеченный результат в виде нового объекта Duration.

Выбрасывает IntegerDivisionByZeroException, если quotient равно 0.

Реализация

Duration operator ~/(int quotient) {
  // By doing the check here instead of relying on "~/" below we get the
  // exception even with dart2js.
  if (quotient == 0) throw IntegerDivisionByZeroException();
  return Duration._microseconds(_duration ~/ quotient);
}

© 2012 the Dart project authors
Licensed under the BSD 3-Clause "New" or "Revised" License.
https://api.dart.dev/stable/2.18.5/dart-core/Duration/operator_truncate_divide.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API