The name of the operator is ~/
. It's a general operator that any class can implement. You could call it the "tilde slash operator" if you need to pronounce it.
The operation that ~/
performs on num
/int
/double
is generally called "integer division" or "truncating division".
Other classes could implement a ~/
operator too, and what it would be called there would depend on what it does. If any existed.
(BigInt
does integer division as well, and I'm not aware of any other implementation of ~/
in common use).
There are a number of multi-symbol operators: ~/
, >>
, <<
, []
, []=
. People do usually name them after the most common use: Shift operators, index/index-set operators, so it would not be inconsistent to use "integer division operator" about ~/
as a default, but it is potentially misleading.
(Say, if someone inspired by C++ made streamController << x
be equivalent to streamController.add(x)
, then reading it as "streamController left-shift x` would probably be confusing.)