units-d
April 9, 2016 ยท View on GitHub
Units and Quantities of Measurement library for D.
This is a modified version of David Nadlinger's original library for working with units of measurement in D.
Task List
-
Use new alias syntax
-
Use new enum syntax
-
Use new template syntax
-
Use UFCS
-
Use
AliasSeqinplace ofTypeTuple -
Use
std.meta.Repeatinstead ofRepeatTypeTuple -
Qualify unittests with, when possible,
@safe pure nothrow @nogc -
Indentations according to Phobos code-standard
-
Remove need for
makeIndexCtfe -
Move
staticFindandIndexedTupletostd.meta -
Replace
Currywithstd.functional.applyLeft. -
Make
ScaledUnitwith integer precision (such as 10 degrees) work with trigonometric functions insi.d. Currently errors caused by incorrect cast in{Scaled|Affine}Unit.{from|to}Base. -
Perhaps add
LinearUnitand use it to express mappings between, for instance, Celsius and Fahrenheit. -
Refactor
GetConversionto do a breadth-first search instead of current depth-first. -
Find a way to represent sample rate. Use it to infer FFT-frequencies. Add it either here or to
samplerateorsampling.
Original discussion at: http://forum.dlang.org/thread/io1vgo\$1fnc\$1@digitalmars.com?page=1
This alternative implementation contains unit expression parsing which might be of interest aswell: https://github.com/biozic/quantities/issues/2#issuecomment-150809715