16 lines
339 B
Text
16 lines
339 B
Text
defimpl Addition for: Native.Float64, as: ->
|
|
|
|
def add other: Native.Integer64, as: ->
|
|
as_float = Huia.Primitive.i64_to_f64!(other)
|
|
Huia.Primitive.f64_addition(self, as_float)
|
|
end
|
|
|
|
def add other: Native.Float64, as: ->
|
|
Huia.Primitive.f64_addition(self, other)
|
|
end
|
|
|
|
def add other: Any, as: ->
|
|
None.new()
|
|
end
|
|
|
|
end
|