Merge branch 'master' of github.com:danvk/dygraphs
[dygraphs.git] / auto_tests / tests / Util.js
index 1fce3a0..3eb59e3 100644 (file)
@@ -79,3 +79,15 @@ Util.assertFontSizes = function(parent, className, expectedSize) {
     assertEquals(expectedSizePx, fontSize);
   }
 };
+
+
+/**
+ * Takes in an array of strings and returns an array of floats.
+ */
+Util.makeNumbers = function(ary) {
+  var ret = [];
+  for (var i = 0; i < ary.length; i++) {
+    ret.push(parseFloat(ary[i]));
+  }
+  return ret;
+};