浏览代码

Use '%' in tutorial

David Peter 1 年之前
父节点
当前提交
60ba4e642f
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      book/src/tutorial.md
  2. 1 1
      examples/what_if_158.nbt

+ 1 - 1
book/src/tutorial.md

@@ -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:

+ 1 - 1
examples/what_if_158.nbt

@@ -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?