btracey
b7896564ce
Fixed spelling error
2013-10-11 10:24:58 -07:00
btracey
e8397b2cd7
Delete empty map keys during mul and div
2013-10-11 10:19:45 -07:00
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
e999e14df5
Fixed compilation errors
2013-10-09 16:07:08 -07:00
btracey
38e3e58d97
Improved dimension type method descriptions
2013-10-09 16:05:48 -07:00
btracey
d5033e7f95
Capitalized interfaces in dimensional types can satisfy Xxxx interface
2013-10-09 16:02:54 -07:00
btracey
f365840987
Changed function comments to reflect changes
2013-10-09 15:51:49 -07:00
btracey
b0165b8c0d
Changed doc.go to reflect changes
2013-10-09 15:51:00 -07:00
btracey
53fc09bd20
Changed FromUnit to From
2013-10-09 15:49:22 -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
52e857f38a
Fixed a few errors in the description
2013-10-09 09:54:41 -07:00
btracey
d1f29730fc
Improved description of unit type
2013-10-08 23:50:56 -07:00
btracey
e18bffccfe
Added further description to doc.go
2013-10-08 23:23:25 -07:00
btracey
f54e30b3ab
Syntax fixes to the difference between using unit and float64 function
2013-10-04 10:37:47 -07:00
btracey
559b25159d
Added a lot of description for the unit types
2013-10-03 21:38:17 -07:00
btracey
b8d3b566cf
Removed old files still tracked by git
2013-10-03 16:46:57 -07:00
btracey
5974bf9407
Fixed minor compile errors
2013-10-02 00:23:56 -07:00
btracey
1f11daeca1
Changed basic unit types back to Length, Mass, etc.
2013-10-02 00:21:51 -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
a84ec572d9
Removed assigning to lse before returning it
2013-09-23 18:11:25 -07:00
btracey
d6d212282a
Removed assigning to _ in benchmarks
2013-09-23 18:10:25 -07:00
btracey
e675bcb935
Changed stop and start timer to resettimer in benchmarks
2013-09-23 18:09:20 -07:00
btracey
9950567d49
Added more comments to the doc
2013-09-19 11:03:59 -07:00
btracey
d844a6a502
Added dimless
2013-09-17 17:46:36 -07:00
btracey
953f638d1c
Started unit.go to contain all the unit types
2013-09-17 17:22:55 -07:00