Refactor calculations (#1116)
* Refactor calculations Refactored calculations::extract_coordinates and calculations::coordinates_present? coordinates_present? Checks whether an argument matches validating criteria (numeric, not NaN), rather than returning false when matching invalidating criteria. Also replaced .to_s == NaN with .to_f..nan? extract_coordinates Now calls coordinates_present? to validate the array, instead of comparing four booleans and initialising extra vars. * Removed .map and ternary from coordinates_present? Updated pull request according to Lime's suggestions.
Please register or sign in to comment