Welcome to SimpleMath, a C++ library providing basic arithmetic operations, trigonometric functions, and advanced mathematical functions. 🌟
- 🔢 Basic arithmetic operations:
add,subtract,multiply,divide - 📐 Trigonometric functions:
sine,cosine,tangent - 🚀 Advanced mathematical functions:
power,squareRoot
SimpleMath/
├── include/
│ └── simplemath.h <-- Header file
├── src/
│ └── simplemath.cpp <-- Source file
├── tests/
│ └── main.cpp <-- Test program
├── CMakeLists.txt <-- CMake configuration file
└── README.md <-- Project documentation
Follow these steps to get started with the SimpleMath library:
- Clone the Repository
git clone https://github.com/EchoSingh/SimpleMath.git
cd SimpleMath- Create a Build Directory
mkdir build
cd build- Generate Build Files with CMake
cmake ..- Build Your Project
cmake --build .- Run the Test Program
./test_programHere's an example of how to use the SimpleMath library:
#include <iostream>
#include "simplemath.h"
int main() {
using namespace SimpleMath;
std::cout << "5 + 3 = " << add(5, 3) << std::endl;
std::cout << "5 - 3 = " << subtract(5, 3) << std::endl;
std::cout << "5 * 3 = " << multiply(5, 3) << std::endl;
std::cout << "5 / 3 = " << divide(5, 3) << std::endl;
std::cout << "sin(30) = " << sine(30 * M_PI / 180) << std::endl;
std::cout << "cos(30) = " << cosine(30 * M_PI / 180) << std::endl;
std::cout << "tan(30) = " << tangent(30 * M_PI / 180) << std::endl;
std::cout << "2^3 = " << power(2, 3) << std::endl;
std::cout << "sqrt(16) = " << squareRoot(16) << std::endl;
return 0;
}This project is licensed under the MIT License - see the LICENSE file for details.
