Browse Source

added g to mg converter

remotes/origin/develop
Sandro Welte 11 months ago
parent
commit
8971900373
  1. 6
      src/convert_g_to_mg.c
  2. 13
      src/convert_g_to_mg.h

6
src/convert_g_to_mg.c

@ -0,0 +1,6 @@
#include "convert_g_to_mg.h"
double g_to_mg(double grams) {
return grams * 1000.0; // 1 gram = 1000 milligrams
}

13
src/convert_g_to_mg.h

@ -0,0 +1,13 @@
#ifndef THEADMIRALS_CONVERT_G_TO_MG_H
#define THEADMIRALS_CONVERT_G_TO_MG_H
double g_to_mg(double grams);
#endif //THEADMIRALS_CONVERT_G_TO_MG_H
Loading…
Cancel
Save