Rename the project from "MyLibrary" to "MedicalLib" to better reflect its intended purpose as a library for medical simulations.

- Rename all files, directories, and internal project names to "MedicalLib".
- Replace the generic `add` function with a more domain-specific `calculateBMI` function as an initial example of the library's capabilities.
- Update the `AGENTS.md` file to describe the new purpose and scope of the MedicalLib library.
This commit is contained in:
google-labs-jules[bot]
2025-08-18 09:02:01 +00:00
parent bdfed240f3
commit 518277356a
9 changed files with 85 additions and 30 deletions
-5
View File
@@ -1,5 +0,0 @@
#include "Library.h"
int add(int a, int b) {
return a + b;
}
-15
View File
@@ -1,15 +0,0 @@
#pragma once
// Define MY_LIB_EXPORT for exporting symbols from the DLL
#if defined(_WIN32)
#if defined(MY_LIB_EXPORT)
#define MY_LIB_API __declspec(dllexport)
#else
#define MY_LIB_API __declspec(dllimport)
#endif
#else
#define MY_LIB_API
#endif
// A simple function to be exported
MY_LIB_API int add(int a, int b);
+12
View File
@@ -0,0 +1,12 @@
#include "MedicalLib/MedicalLib.h"
#include <stdexcept>
double calculateBMI(double weight_kg, double height_m) {
if (height_m <= 0) {
throw std::invalid_argument("Height must be positive.");
}
if (weight_kg <= 0) {
throw std::invalid_argument("Weight must be positive.");
}
return weight_kg / (height_m * height_m);
}