Use proper float conversion
This commit is contained in:
parent
b2668e2d96
commit
3937e3f60c
1 changed files with 1 additions and 1 deletions
|
@ -79,7 +79,7 @@ defmodule RDF.XSD.Double do
|
|||
@spec elixir_mapping(valid_value | integer | any, Keyword.t()) :: value
|
||||
def elixir_mapping(value, _)
|
||||
def elixir_mapping(value, _) when is_float(value), do: value
|
||||
def elixir_mapping(value, _) when is_integer(value), do: value / 1
|
||||
def elixir_mapping(value, _) when is_integer(value), do: :erlang.float(value)
|
||||
def elixir_mapping(value, _) when value in @special_values, do: value
|
||||
def elixir_mapping(_, _), do: @invalid_value
|
||||
|
||||
|
|
Loading…
Reference in a new issue