Skip to main content

Mojo module

floatable

Implements the Floatable and FloatableRaising traits.

These are Mojo built-ins, so you don't need to import them.

Traits

  • Floatable: The Floatable trait describes a type that can be converted to a Float.
  • FloatableRaising: The FloatableRaising trait describes a type that can be converted to a Float, but the conversion might raise an error (e.g.: a string).

Functions

  • float: Get the Float representation of the value.