+ library unit tests

This commit is contained in:
Wiktor Mazur
2019-09-11 20:56:59 +02:00
parent 77479d5ae0
commit aa8c398bf5
3 changed files with 256 additions and 61 deletions
+4
View File
@@ -15,6 +15,10 @@ pub struct DPS(f32);
impl DPS {
fn new(damage: f32, time: f32) -> Self {
if time == 0.0 {
return Self(0.0)
}
Self(damage / time * 1000.0)
}