fix: length tool throws error when measured value "length" is undefined (#1189)
fix: length tool throws error when measured value "length" is undefined (#1189)

* fix: length tool throws error when measured value "length" is undefined

* move internal function up scope

* appease linter
cornerstonejs/cornerstoneTools,cornerstonejs/cornerstoneTools,chafey/cornerstoneTools,cornerstonejs/cornerstoneTools