Skip to content

Commit

Permalink
Use '%' in tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkdp committed Oct 9, 2024
1 parent 359e50a commit 60ba4e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion book/src/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ potassium-40 atom](https://commons.wikimedia.org/wiki/File:Potassium-40-decay-sc
you can optionally add a `: Energy` annotation that will be enforced by Numbat:

``` numbat
let energy_per_decay: Energy = 11 percent × 1.5 MeV + 89 percent × 1.3 MeV
let energy_per_decay: Energy = 11% × 1.5 MeV + 89% × 1.3 MeV
```

This also works with custom units since Numbat adds new physical dimensions (types) implicitly:
Expand Down
2 changes: 1 addition & 1 deletion examples/what_if_158.nbt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ print("Radioactivity of a banana: {radioactivity_banana}")
# A single 40-K decay releases an energy of
# (https://commons.wikimedia.org/wiki/File:Potassium-40-decay-scheme.svg)

let energy_per_decay: Energy = 11 percent × 1.5 MeV + 89 percent × 1.3 MeV
let energy_per_decay: Energy = 11% × 1.5 MeV + 89% × 1.3 MeV

# Finally: how many bananas do we need to power a single household?

Expand Down

0 comments on commit 60ba4e6

Please sign in to comment.