Skip to content

ut_scale does not support scaling by 0 #346

@Enchufa2

Description

@Enchufa2
> x1 <- set_units(0, "m")
> x2 <- set_units(3, "m")
> x1 < x2
Error in ud_compare(e1, e2, as.character(units(e1)), as.character(units(e2))) : 
  ut_scale(): NULL factor argument

Similarly,

> units:::R_ut_scale(units:::R_ut_parse("m"), 0)
Error in units:::R_ut_scale(units:::R_ut_parse("m"), 0) : 
  ut_scale(): NULL factor argument

Reported here, but meanwhile we need to do something about it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions