-
Notifications
You must be signed in to change notification settings - Fork 122
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
add MolarEnergy, implement Energy unimplemented method #274
Conversation
7550b0f
to
ab7e211
Compare
* @author Nicolas Vinuesa | ||
* @since 1.4 | ||
* | ||
* @param value Double |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some description?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean, I'm not very familiar with MolarEnergy
, perhaps we could add a link to wikipedia?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its just a unit of energy over mass. The link could be: https://en.wikipedia.org/wiki/Joule_per_mole
Should I add it in the class? I've not seen it elsewhere...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, you're right. I've seen only one case but that is in another level. Nevermind
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good in general, I'll wait for others to comment before approving
LGTM. We'll need to add this to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add to Implicit Dimensions class.
@derekmorr it is already in implicitDimensions ... check the commit |
Ah, sorry. Too many commits this morning. |
I think that misspelling of JoulesToMole should be corrected before this is merged. |
Of course, i'll get it done right away |
@garyKeorkunian done! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
def apply[A](n: A)(implicit num: Numeric[A]) = MolarEnergy(n, this) | ||
} | ||
|
||
object JoulesPerMol extends MolarEnergyUnit with PrimaryUnit with SiUnit { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be JoulesPerMole?
|
||
def *(that: ChemicalAmount): Energy = Joules(this.toJoulesPerMol * that.toMoles) | ||
|
||
def toJoulesPerMol = to(JoulesPerMol) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here ... toJoulesPerMole
This is the 5th PR concerning #252 and the first one implementing unimplemented methods and missing units in energy.