Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pressure units #210

Merged
merged 3 commits into from
Mar 16, 2017
Merged

Pressure units #210

merged 3 commits into from
Mar 16, 2017

Conversation

cquiroz
Copy link
Collaborator

@cquiroz cquiroz commented Mar 16, 2017

Added a couple of units of pressure used often in medicine and engineering

  • mmHg
  • Torr


object Torr extends PressureUnit {
val symbol = "Torr"
val conversionFactor = Newtons.conversionFactor * 101325d / 760d
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A Torr is "defined as exactly 1 / 760 of a standard atmosphere" (per wikipedia). So I wonder if conversionFactor would be better defined as StandardAtmospheres.conversionFactor / 760d ? It won't matter for correctness, but might make the definition easier to read.

Copy link
Collaborator

@derekmorr derekmorr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@cquiroz
Copy link
Collaborator Author

cquiroz commented Mar 16, 2017

Did as suggested and also changed MillimeterOfMercury and Torr class names to the plural version to match the other units

@derekmorr derekmorr merged commit 2515d28 into typelevel:master Mar 16, 2017
@cquiroz cquiroz deleted the pressure-units branch March 16, 2017 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants