dcolli23 / ingreedyents

Optimizes the use of ingredients by ingredient UPC lookup
0 stars 0 forks source link

Implement unit conversions for Measurement class #39

Closed dcolli23 closed 4 years ago

dcolli23 commented 4 years ago

Description

We need a way to do unit conversions in the Measurement class.

dcolli23 commented 4 years ago

Unsurprisingly this isn't a trivial problem. There seems to be a decent amount of libraries out there for this sort of thing but it would also be kind of fun to implement this on my own.

This would give me a good chance to create a CMake template repository for myself and get familiar with namespace management.

dcolli23 commented 4 years ago

I'm definitely going to make my own independent repo for this and make every unit a type. This is a lot like what I've been doing but with much more structure.

dcolli23 commented 4 years ago

I need to use the std::ratio class template for this since it is sorted out at compile-time.

dcolli23 commented 4 years ago

I've done this at https://github.com/dcolli23/uniTypes