Skip to content

Conversation

@cbracken
Copy link
Member

@cbracken cbracken commented Aug 31, 2020

Description

moreOrLessEquals is the preferred mechanism for checking that a value is within some error bound epsilon, with default value for epsilon of precisionErrorTolerance.

This patch replaces instances of closeTo using precisionErrorTolerance.

moreOrLessEquals is the preferred mechanism for checking that a value is
within some error bound epsilon, with default value for epsilon of
precisionErrorTolerance.

This patch replaces instances of closeTo using precisionErrorTolerance.
@cbracken cbracken requested a review from Hixie August 31, 2020 00:39
@flutter-dashboard flutter-dashboard bot added the framework flutter/packages/flutter repository. See also f: labels. label Aug 31, 2020
@cbracken
Copy link
Member Author

cbracken commented Aug 31, 2020

Looks like there's probably a ton more opportunity for cleanup, but this just covers the low-hanging fruit.

Update: followup patch in #64915, which covers the non-default cases. That PR is more of a "what do you think?"

@cbracken cbracken changed the title Prefer moreOrLessEquals to closeTo Prefer moreOrLessEquals over closeTo Aug 31, 2020
@cbracken cbracken merged commit c935a44 into flutter:master Aug 31, 2020
@cbracken cbracken deleted the moreOrLess branch August 31, 2020 05:19
mingwandroid pushed a commit to mingwandroid/flutter that referenced this pull request Sep 6, 2020
moreOrLessEquals is the preferred mechanism for checking that a value is
within some error bound epsilon, with default value for epsilon of
precisionErrorTolerance.

This patch replaces instances of closeTo using precisionErrorTolerance.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants