Created
October 3, 2011 19:14
-
-
Save soc/1259954 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package metascala.example | |
object UnitExample extends App { | |
import metascala.Units._ | |
val length = 5.0 *~ (2.0 m) | |
val length2 = length + (2.0 m) *~ 5.0 | |
val time = (5.0 s) *~ 5.0 | |
val speed = length2 *~ 2.0 /~ time /~ 4.0 | |
val mass = (5.0 kg) + (5.0 kg) | |
val cd = 1.0 /~ (0.2 cd) | |
println(length) | |
println(length2) | |
println(time) | |
println(speed) | |
println(mass) | |
println(cd) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment