Lyricdev
GitHub

interface Pow

pub interface Pow

A number to a power: an integer to a whole one, computed by squaring; a float to any.

The exponent's type is the number's own answer — uint for an integer, the float itself for a float —, so pow(2, 10) and pow(2.0, 0.5) are one function.

Associated types

type Exponent

Methods

fn pow(e: Self.Exponent): Self

Returns this to the power e.