Browse Source

added ton to megaton converter

remotes/origin/develop
Sandro Welte 11 months ago
parent
commit
0e670feaf5
  1. 7
      src/convert_ton_to_mt.c
  2. 13
      src/convert_ton_to_mt.h

7
src/convert_ton_to_mt.c

@ -0,0 +1,7 @@
#include "convert_ton_to_mt.h"
double tons_to_megatons(double tons) {
return tons / 1000000.0; // 1 megaton = 1,000,000 tons
}

13
src/convert_ton_to_mt.h

@ -0,0 +1,13 @@
#ifndef THEADMIRALS_CONVERT_TON_TO_MT_H
#define THEADMIRALS_CONVERT_TON_TO_MT_H
double tons_to_megatons(double tons);
#endif //THEADMIRALS_CONVERT_TON_TO_MT_H
Loading…
Cancel
Save