Eve-ning / vsrg

a c++ static library for vsrg
https://twitter.com/dev_evening
2 stars 0 forks source link

Unit Conversion functions to be squashed into a global func #10

Closed Eve-ning closed 4 years ago

Eve-ning commented 4 years ago

getOffsetSec() to be squashed to getOffset(TimedObject::Units::Sec) getOffsetMin() to be squashed to getOffset(TimedObject::Units::Min)

and so on...

where

TimedObject {
    Units { double Sec = 1000; double Min = 60000; ... }
}

Decreases the function space clutter but makes code generally longer, I think it's more beneficial this way as it's clearer and we don't have to declare multiple functions for any function that requires unit conversion

Eve-ning commented 4 years ago

Resolved by #12