Skip to content

Releases: jmckinney7/MathUtility

MathUtility v1.0.0

Choose a tag to compare

@jmckinney7 jmckinney7 released this 24 Aug 19:12
28c6169

Full Changelog: https://github.com/jmckinney7/MathUtility/commits/v1.0.0

MathUtility v1.0.0

This package contains the MathUtility library for C++.

Contents

Directories Information
bin/ Compiled DLL (MathUtility.dll)
lib/ Import Library (MathUtility.lib)
include/ Header files (MathUtility.h)
debug/ Debugging Symbols (.pdb, .exp)

Installation

  1. Copy 'include/MathUtility.h' into your project's include path.
  2. Link against 'lib/MathUtility.lib' in your project settings.
  3. Place 'bin/MathUtility.dll' in the same folder as your .exe (for dynamic linking).

Usage Examples

Static Linking

#include "MathUtility.h"
#pragma comment(lib, "MathUtility.lib")

double result = add(2, 3); // 2 + 3 = 5

Dynamic Linking

#include <Windows.h>

typedef double(*dUtil)(double, double);
typedef int(*iUtil)(int, int);

int main() {
    HMODULE hmod = LoadLibrary("MathUtility.dll");
    dUtil add = (dUtil)GetProcAddress(hmod, "add");
    iUtil mod = (iUtil)GetProcAddress(hmod, "mod");

    if(mod && add) {
        double addResult = add(2, 3); // 2 + 3 = 5
        int modResult = mod(10, 5) // 10 mod 5 = 0
    }

    FreeLibrary(hmod);
}

License

This project is licensed under the MIT License.