btracey
49c9af6cf2
Added quotations around symbol in panic
2013-10-11 10:10:59 -07:00
kortschak
eba71ea8b6
Move unit list construction to Dimensions
...
This simplifies the Unit Format code and offers more flexibility for
creating strings of unit descriptions. We potentially have the
opportunity to make the currently split Format methods unified using
this too, althoug this is an issue that needs further thought.
2013-10-11 22:28:16 +10:30
kortschak
253278c372
Typo and doc fixes
2013-10-11 11:14:51 +10:30
kortschak
908d66676d
Replace String() with Format(), and tests
2013-10-11 10:08:21 +10:30
kortschak
12a0be57a4
Size slice more carefully
2013-10-10 12:23:35 +10:30
kortschak
7601daed10
Remove mutex and simplify dimension handling
...
Lookups are now done via a slice where possible.
2013-10-10 12:19:41 +10:30
btracey
d3da6ef3ad
Better panic message from add
2013-10-09 17:54:25 -07:00
btracey
f365840987
Changed function comments to reflect changes
2013-10-09 15:51:49 -07:00
btracey
9f4d726c13
Changed Unit.String to take a pointer
2013-10-09 15:48:31 -07:00
btracey
cc98269d07
Changed NewUnit to New
2013-10-09 15:48:12 -07:00
btracey
f62f54d8c1
Removed init function
2013-10-09 13:17:46 -07:00
btracey
499962dc16
Made symbolToDimension and dimensionToSymbol defined at compile time instead of in init()
2013-10-09 13:17:21 -07:00
btracey
4905092117
fixed constant definition error
2013-10-09 13:11:19 -07:00
btracey
93bc636593
better comment in dimension constants
2013-10-09 13:08:47 -07:00
btracey
c65eafd8b1
Fixed formatting of Dimension docstring
2013-10-09 13:07:30 -07:00
btracey
74bc156098
Improved documentation
2013-10-09 12:52:09 -07:00
btracey
0735549733
Changed method arguments to be more clear
2013-10-09 12:02:16 -07:00
btracey
60a7fa0433
Removed dead code
2013-10-09 11:56:29 -07:00
btracey
2035ec6ead
Made symbols print in alphabetical order
2013-10-09 11:56:12 -07:00
btracey
49158fb3e4
Added symbol safety to NewDimension
2013-10-09 11:41:09 -07:00
btracey
479bf9450c
Made Unit and all dimensional types stringers
2013-10-09 11:12:19 -07:00
btracey
03acc7ba62
Added fancy printing of type unit
2013-10-09 10:52:21 -07:00
btracey
7cae6014b0
Fixed coding errors in unit example
2013-10-09 10:12:57 -07:00
btracey
5974bf9407
Fixed minor compile errors
2013-10-02 00:23:56 -07:00
btracey
02b124dc86
Changed to just having a map
2013-10-02 00:18:27 -07:00
btracey
9c22ff701b
Last commit before going back to pure map implementation for simplicity
2013-10-02 00:13:27 -07:00
btracey
68fea43977
Changed to XxxDim for dimensions
2013-10-02 00:12:53 -07:00
btracey
160c4cdb30
Finished unit implementation with map backing
2013-09-30 23:17:02 -07:00
btracey
30a7262db8
Started changing unit definition to include both a map and a list of dimensions
2013-09-30 23:00:38 -07:00
btracey
5cf755a7a4
Changed unit types to be based on their SI names
2013-09-30 22:41:50 -07:00
btracey
2cd9b97117
Changed unit.go to unittype.go
2013-09-17 17:22:23 -07:00