diff --git a/src/lib/aqdiagram/graph/datapair.t2d b/src/lib/aqdiagram/graph/datapair.t2d index 1cecf00..e6b14fb 100644 --- a/src/lib/aqdiagram/graph/datapair.t2d +++ b/src/lib/aqdiagram/graph/datapair.t2d @@ -22,6 +22,82 @@
aqdiagram/aqdg_api.h
+ + + + $(api) double $(struct_prefix)_List_GetMinDiffX(const $(struct_type)_LIST *st); + + + + + + double $(struct_prefix)_List_GetMinDiffX(const $(struct_type)_LIST *stList) \n + { \n + int idx=0; \n + double diff=0.0; \n + const $(struct_type) *dp; \n + const $(struct_type) *dpPrevious=NULL; \n + \n + dp=$(struct_prefix)_List_First(stList); \n + while(dp) { \n + if (idx==1) \n + diff=dp->valueX-dpPrevious->valueX; \n + else if (idx>1) { \n + double newDiff; \n + \n + newDiff=dp->valueX-dpPrevious->valueX; \n + if (newDiff<diff) \n + diff=newDiff; \n + } \n + dpPrevious=dp; \n + idx++; \n + \n + dp=$(struct_prefix)_List_Next(dp); \n + } \n + return diff; \n + } \n + + + + + + $(api) double $(struct_prefix)_List_GetMinDiffY(const $(struct_type)_LIST *st); + + + + + + double $(struct_prefix)_List_GetMinDiffY(const $(struct_type)_LIST *stList) \n + { \n + int idx=0; \n + double diff=0.0; \n + const $(struct_type) *dp; \n + const $(struct_type) *dpPrevious=NULL; \n + \n + dp=$(struct_prefix)_List_First(stList); \n + while(dp) { \n + if (idx==1) \n + diff=dp->valueY-dpPrevious->valueY; \n + else if (idx>1) { \n + double newDiff; \n + \n + newDiff=dp->valueY-dpPrevious->valueY; \n + if (newDiff<diff) \n + diff=newDiff; \n + } \n + dpPrevious=dp; \n + idx++; \n + \n + dp=$(struct_prefix)_List_Next(dp); \n + } \n + return diff; \n + } \n + + + + + +