Skip to content

normalizeLength #149

@craouette

Description

@craouette

Hi,

not tested, but I noticed that in src/buildingParts.js, line 363 to 367, you have for the function normalizeLength:

      if (length.includes('mi')){
        // remove final character.
        return parseFloat(length.substring(0, length.length - 2)) * 5280 * 12 * 2.54 / 100;
      }
      if (length.includes('nmi')){
        // remove final character.
        return parseFloat(length.substring(0, length.length - 3)) * 1852;
      }

these 2 checks should be inverted, as if you have 'nmi', you also have 'mi' and so, the first test will match and the second cannot be reached.

thanks for soft, very helpfull,

Pierre

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions