Browse Source

Add demo from README as an example

David Peter 2 years ago
parent
commit
551700766a
1 changed files with 7 additions and 0 deletions
  1. 7 0
      examples/readme-demo.nbt

+ 7 - 0
examples/readme-demo.nbt

@@ -0,0 +1,7 @@
+use units::currencies
+
+8 km / (1 h + 25 min)
+140 € -> GBP
+atan2(30 cm, 1 m) -> deg
+let ω = 2π c / 660 nm
+print("Energy of red photon: {ℏ ω -> eV}")