Skip to content

feat: Add Density units (k|m|µ|n)g per (k|m|µ|n)l#509

Merged
cquiroz merged 1 commit into
typelevel:masterfrom
yangchoo:add-density-units
Jan 6, 2022
Merged

feat: Add Density units (k|m|µ|n)g per (k|m|µ|n)l#509
cquiroz merged 1 commit into
typelevel:masterfrom
yangchoo:add-density-units

Conversation

@yangchoo

@yangchoo yangchoo commented Jan 5, 2022

Copy link
Copy Markdown

Add density units for all combinations of kilo, milli, micro and nano
grams per kilo, milli, micro and nano litres.

Fixed bug with existing multiplication conversion and explicitly typed
all return values for Density class and object.

Add density units for all combinations of kilo, milli, micro and nano
grams per kilo, milli, micro and nano litres.

Fixed bug with existing multiplication conversion and explicitly typed
all return values for Density class and object.

def *(that: Volume): Mass = Kilograms(this.value * that.toCubicMeters)
def *(that: Volume): Mass = Kilograms(this.toKilogramsPerCubicMeter * that.toCubicMeters)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this the fix that you mentioned?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

yup, exactly

@cquiroz cquiroz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks a lot for your PR and for including tests

@cquiroz
cquiroz merged commit 74231e4 into typelevel:master Jan 6, 2022
@mkiwala mkiwala mentioned this pull request May 11, 2026
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