summaryrefslogtreecommitdiffstats
path: root/src/helper-fns.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/helper-fns.h')
-rw-r--r--src/helper-fns.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/helper-fns.h b/src/helper-fns.h
index 10c311eda..f588b9905 100644
--- a/src/helper-fns.h
+++ b/src/helper-fns.h
@@ -39,7 +39,16 @@ static bool helperfns_read_bool(gchar const *value, bool default_value){
}
return default_value;
}
-
+
+static std::vector<gdouble> helperfns_read_vector(const gchar* value, int size){
+ std::vector<gdouble> v(size, (gdouble) 0);
+ int i;
+ gchar** values = g_strsplit(value , " ", size);
+ for (i=0;i<size;i++)
+ v[i] = g_ascii_strtod(values[i], NULL);
+ return v;
+}
+
#endif /* !SEEN_HELPER_FNS_H */
/*