-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: animationAnimation APIsAnimation APIsframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version
Description
Steps to Reproduce
- I was reading the source code of Flutter and found a little mistake in spring_simulation.dart.
- It is in line 185. When calculating the critical damping solution, I got a different result.
- My calculation steps are as follows: y = (c1 + c2 * t) * e ^(r * t) get: v = c2 * e^(r * t) + (c1 + c2 * t) * r * e ^ (r * t) .
- When t = 0, get: y = c1, v = c2 + c1 * r, then c2 = v - c1 * r .
- So I think this code should be: "final double c2 = velocity - (r * distance);" , but not "final double c2 = velocity / (r * distance );".
- I calculated many times and tried to make sure every step of my calculation was right, always got this result.
- Was this a mistake or am I wrong?
- Thank you.
Expected results:
Actual results:
Code sample
Logs
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: animationAnimation APIsAnimation APIsframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version