Parcourir la source

Add planck constant, electronvolt

David Peter il y a 2 ans
Parent
commit
c800177d12
1 fichiers modifiés avec 8 ajouts et 2 suppressions
  1. 8 2
      prelude.nbt

+ 8 - 2
prelude.nbt

@@ -154,6 +154,10 @@ unit bit: Bit
 @aliases(byte: both, bytes: both, octet, octets, B: short)
 unit byte: Bit = 8 bit
 
+@metric_prefixes
+@aliases(eV: short)
+unit electronvolt = 1.602176634e-19 J
+
 ### Common abbreviations
 
 @metric_prefixes
@@ -205,8 +209,10 @@ unit sec = second
 
 ### Physical constants
 
-let gravity = 9.80665 meter / second^2
-let speed_of_light = 299792458 meter / second
+let gravity = 9.80665 m / s^2
+let speed_of_light = 299792458 m / s
+let planck_constant = 6.62607015e-34 J / Hz
+let ℏ = planck_constant / 2π
 
 ## Mathematical functions