Note: information on this page refers to Ceylon 1.0, not to the current release.

** (scale) operator

The right-associative, binary infix ** operator is used to scale an instance of Scalable but an amount.

Usage

value four_plus_6i = 2 ** Complex(2, 3);

Description

Definition

The ** operator is defined as follows:

rhs.scale(lhs);

Note that the lhs is evaluated before the rhs

See the language specification for more details.

Polymorphism

The ** operator is polymorphic. The meaning of ** depends on the Scalable interface.

Type

The result type of the ** operator is the type of its right hand operand.

Meaning of scale for built-in types

No types in the language module satisfy Scalable.

See also