From 5ee5ee8d9af82d8345f0a64c1ad082ba792c7aa9 Mon Sep 17 00:00:00 2001 From: Uwe Jakobeit Date: Thu, 2 Apr 2026 09:27:44 +0200 Subject: [PATCH] file header and comments supplied --- app/util.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/app/util.h b/app/util.h index 0d988ac..2855288 100644 --- a/app/util.h +++ b/app/util.h @@ -1,5 +1,15 @@ #ifndef UTIL_H #define UTIL_H +/* +File: util.h +Description: This is a C++ header file containing utility functions +Rev: 0.1 +Created: 01.04.26 +Author: Uwe Jakobeit +Copyright: Binder GmbH TUT +Purpose: Supply utility functions for math. evaluation, validation, conversion +Notes: [Any relevant details, such as dependencies, usage examples, or known issues.] +*/ #include #include @@ -11,7 +21,10 @@ namespace UTILITY_FUNCTIONS { - +// determine if x is in range of ]lo;hi[ +// if so - x will be returned +// if not - lo will be returned if x is smaller than lo +// - hi will be returned if x is greater than hi inline double limit(double x, double lo, double hi) { return (x < lo) ? lo : (x > hi) ? hi : x; }