The Crystal programming language | http://crystal-lang.org | Fund Crystal's development: http://is.gd/X7PRtI | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/
include Origin::Shared
into each concrete type instead of once in the Vector mixin.@type
is expanded for the concrete struct?
Probably not, but is there an existing library for outputting tabulated numbers, particularly floats? I would like to define an #inspect
method for 4x4 matrices so it looks like:
0.123 0.484824 12.434934 93.32459
10.4944 0.43244 343.3434 434.0
23.2384 29.34242 93.22424 0.12525
0.2435 0.533556789 0.645532 0.2434534
except:
1) padding should be auto-inserted such that the whitespace around each column is aligned
2) padding should be auto-inserted such that the decimal points in a column are all aligned.
[428.206840, 641.180912, 529.714861, 466.054420
449.058745, 849.850763, 606.009279, 977.445823
242.486631, 25.559494, 67.856057, 165.478953
597.418470, 179.321626, 859.131128, 479.821710]