Vdb 67 convert numbers to ray and wad (#105)

* Add method to convert values to ray or wad units

* Convert data to ray or wad for cat_file_chop_lump

* Use shared convert functions in price feed conversion

* Pull common ray/wad values into vars

* Fix after rebase with staging
This commit is contained in:
Elizabeth
2018-11-09 14:53:20 -06:00
committed by GitHub
parent 68464d375a
commit c1e10f09fb
10 changed files with 153 additions and 35 deletions
+16
View File
@@ -45,5 +45,21 @@ var _ = Describe("Shared utilities", func() {
Expect(expected[:]).To(Equal(actual))
})
It("converts values to rays", func() {
rayOne := shared.ConvertToRay("123456789012345678901234567890")
Expect(rayOne).To(Equal("123.456789012345680589533003513"))
rayTwo := shared.ConvertToRay("1234567890123456790123567890")
Expect(rayTwo).To(Equal("1.234567890123456912476740399"))
})
It("converts values to wads", func() {
wadOne := shared.ConvertToWad("12345678901234567890123")
Expect(wadOne).To(Equal("12345.678901234567092615"))
wadTwo := shared.ConvertToWad("1234567890123456789")
Expect(wadTwo).To(Equal("1.234567890123456690"))
})
})
})