View Source Squeeze.Velocity (OpenPace v0.0.1)
This module defines the distances used in forms.
Link to this section Summary
Functions
Callback implementation for Ecto.Type.cast/1
.
Callback implementation for Ecto.Type.dump/1
.
Callback implementation for Ecto.Type.embed_as/1
.
Callback implementation for Ecto.Type.equal?/2
.
Callback implementation for Ecto.Type.load/1
.
Takes velocity in meters per second and converts it to either minutes per mile or minutes per kilometer
Callback implementation for Ecto.Type.type/0
.
Link to this section Functions
Callback implementation for Ecto.Type.cast/1
.
Callback implementation for Ecto.Type.dump/1
.
Callback implementation for Ecto.Type.embed_as/1
.
Callback implementation for Ecto.Type.equal?/2
.
Callback implementation for Ecto.Type.load/1
.
Takes velocity in meters per second and converts it to either minutes per mile or minutes per kilometer
examples
Examples
iex> to_float(3.2, imperial: true) 8.38 # minutes per mile
iex> to_float(3.2, imperial: false) 5.20 # minutes per kilometer
Callback implementation for Ecto.Type.type/0
.