ianmackenzie / elm-units

Simple, safe and convenient unit types and conversions for Elm
https://package.elm-lang.org/packages/ianmackenzie/elm-units/latest/
BSD 3-Clause "New" or "Revised" License
84 stars 14 forks source link

Adds angstrom and nanometer to Length with corresponding tests. #49

Closed ChrisWellsWood closed 4 years ago

ChrisWellsWood commented 4 years ago

I work with very small stuff, so I added nanometers as well as angstroms, which are equal to 1e-10 m. Angstroms (Å) are used widely in structural biology and chemistry, as they are convenient for describing distances at the atomic scale. For example, 1 Å is quite close to most chemical bond lengths.

ianmackenzie commented 4 years ago

Looks great! Just made some minor fixes to ensure all the functions were properly exposed and listed in the docs.

Also, very exciting that you're using elm-units for some interesting scientific work - would love to see what you come up with, if it's something you can share at some point =)

I might try to see if I can sneak in #46 and/or #47 first, but I don't see why I shouldn't be able to push this out as a 2.5 release pretty soon.

ianmackenzie commented 4 years ago

Oh, one more comment - could you add yourself to the AUTHORS file? =)

ChrisWellsWood commented 4 years ago

Great, thanks very much, I've done that now.

I have a research group that designs new proteins (the molecule not the food group). I'm planning on writing a library for visualising molecular structures using Elm, so that we can switch over to using that instead of our existing JS solution. I'm planning on using a bunch of your libraries to do it (elm-geometry and elm-units). I'm sure that I'll be able to share once it's finished.

ianmackenzie commented 4 years ago

Cool! What are you planning on using for the actual visualization? You may be aware of some or all of these, but if you're already using elm-geometry and elm-units then there are a few related graphics packages at various stages of development:

ChrisWellsWood commented 4 years ago

I've already started using elm-3d-scene, and it's been great so far. I was really impressed with your Elm Conf presentation on it, I think that, for me as a scientist, the physical units that you've used throughout it make it particularly pleasant to use i.e. luminance, chromaticity, material properties etc. Really quick to get something up and running too, and it's a relief not to have to write GLSL shaders. I'll post a demo on Elm Discourse once it's a bit more developed.

ianmackenzie commented 4 years ago

Awesome, looking forward to it!

ianmackenzie commented 4 years ago

Just published 2.5.0 with these additions 🙂

ChrisWellsWood commented 4 years ago

That's great, thanks very much!