Skip to content

EBNFUnitFormat can not handle chain of TransformedUnit #406

@unixfan2

Description

@unixfan2
val formatter = DefaultFormatService().getUnitFormat("EBNF")
val test = Units.METRE.multiply(2).multiply(2)
println(formatter.format(test))

result: m·2

I guess the reason for that is that EBNFHelper.formatInternal is using "parentUnit = unit.getSystemUnit()" instead of the direct parent in the last else block for handling transformed units.
Maybe changing that would also make all the dirty hacks in that section obsolete.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions