Skip to content

Commit

Permalink
Add temperature converter example
Browse files Browse the repository at this point in the history
  • Loading branch information
RoyalIcing committed Mar 5, 2024
1 parent b252153 commit 3e3af74
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions guides/temperature-converter.livemd
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Orb Temperature Converter

```elixir
Mix.install([
{:orb, "~> 0.0.33"}
])
```

## Section

```elixir
defmodule Example do
use Orb

wasm_mode(Orb.F32)

defw fahrenheit_to_celsius(fahrenheit: F32), F32 do
(fahrenheit - 32.0) * 5.0 / 9.0
end
end
```

```elixir
Orb.to_wat(Example)
```

0 comments on commit 3e3af74

Please sign in to comment.