Skip to content

Commit

Permalink
Assert on component type
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Jan 15, 2025
1 parent bbff1eb commit 17344af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/complex.ex
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ defmodule Complex do

defp to_string_component(n) when n == 0, do: "+0.0"

defp to_string_component(n) do
defp to_string_component(n) when is_number(n) do
abs_s = Kernel.to_string(abs(n))

if n >= 0 do
Expand Down

0 comments on commit 17344af

Please sign in to comment.