Skip to content

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

License

Notifications You must be signed in to change notification settings

SpaciousCoder78/unitconversion.hpp

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++ library containing predefined unit conversion formulas to make your life easier

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages