changeset 496:4b85578159e1

Round on printout
author Chris Cannam
date Tue, 19 Nov 2013 14:37:39 +0000
parents 8af5e23f2873
children 2202e40f375a 261bf81f29b4
files src/may/matrix.yeti src/may/stream/framer.yeti
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/may/matrix.yeti	Tue Nov 19 14:18:46 2013 +0000
+++ b/src/may/matrix.yeti	Tue Nov 19 14:37:39 2013 +0000
@@ -42,6 +42,7 @@
 module may.matrix;
 
 vec = load may.vector;
+mm = load may.mathmisc;
 
 typedef opaque matrix_t =
     DenseRows array<vec.vector_t> | // array of rows
@@ -808,7 +809,7 @@
             [ "\nColumns \(c0) to \(c1)\n",
               (map do row:
                    map do v:
-                       n = int (v * 10000);
+                       n = mm.round (v * 10000);
                        strPad ' ' 10 "\(n / 10000)";
                    done (vec.list row);
                done (asRows (columnSlice m c0 (c1 + 1))) |> concat |> strJoin "")
--- a/src/may/stream/framer.yeti	Tue Nov 19 14:18:46 2013 +0000
+++ b/src/may/stream/framer.yeti	Tue Nov 19 14:37:39 2013 +0000
@@ -29,8 +29,7 @@
     fi;
 
 overlappingBlockList size hop stream valid buffer =
-   (
-    m = stream.read hop;
+   (m = stream.read hop;
     obtained = mat.width m;
 
     // Retain framesize - hop samples from old buffer, add hop samples