Skip to content

BuddingProgrammer999/unitconversion.h

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

unitconversion.hpp

A C++ library containing predefined unit conversion formulas to make your life easier.

The library is compatible C++

For any sort of help or discussions, use the discussions tab of this repository

Work in progress

This library is licensed under MIT License.

Contributions are welcome.

Supported Units

  • Metres
  • Kilometres
  • Centimetres

How to use

  • Download the source code from this repository.
  • Copy the include folder and paste it in a folder containing your C++ source file.
  • Include the header file that you want in the beginning of your program. For example: If you want to include metres.h, you can do it like this: image
  • Call the required function you need (eg. centimetres_to_millimetres()) and pass the parameters (in this case, centimetres) into the function parameters to use the function

Example: image

Contribution Guidelines

  • The header file name must start with the unit name in plural and end with .hpp extension (eg. metres.hpp)
  • The header file must contain ifndef, define and endif statements. The functions should be written between the define and endif statements.
  • Function name should be in the format of unitname_to_unitname.

About

A C/C++ header file folder containing predefined unit conversion formulas to make your life easier

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 97.1%
  • C 2.9%