Update math.dart:atan2 in relation to atan comment

It's a **typo**. It should say **atan(a/b).**
The way the _atan2(a,b)_ is defined _x=b, y=a => atan2(y,x) = atan(y/x) if x is positive_.

So _atan2(a,b) = atan(a/b) if b is positive._

Indeed:
```
import 'dart:math';

void main() {
    double a = 1, b = 2;
    assert(atan2(a, b) == atan(a / b));
    assert(atan2(a, b) != atan(b / a));
}
```

Closes #39479
https://github.com/dart-lang/sdk/pull/39479

GitOrigin-RevId: 73910bb787c2dbb811bb9f7fb1bd8bab22ef92ad
Change-Id: I189030346e7f6ccf8526d444101dd0172a54ee53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125926
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
This commit is contained in:
dimpen 2019-12-16 12:45:27 +00:00 committed by commit-bot@chromium.org
parent c85979a280
commit 0aa9ce5c57

View file

@ -77,7 +77,7 @@ external T max<T extends num>(T a, T b);
/// and the vector ([b],[a]).
/// The result is in the range -PI..PI.
///
/// If [b] is positive, this is the same as `atan(b/a)`.
/// If [b] is positive, this is the same as `atan(a/b)`.
///
/// The result is negative when [a] is negative (including when [a] is the
/// double -0.0).