Skip to content

Fix normalization of degrees in AnimatedInterpolation#36645

Closed
javache wants to merge 1 commit into
react:mainfrom
javache:export-D44406034
Closed

Fix normalization of degrees in AnimatedInterpolation#36645
javache wants to merge 1 commit into
react:mainfrom
javache:export-D44406034

Conversation

@javache

@javache javache commented Mar 26, 2023

Copy link
Copy Markdown
Contributor

Summary:
This broke while changing the AnimatedInterpolation back in D40571873 and D40632443, as I assumed the native side would be able to correctly handle values such as '1rad'. However these were being sent over as strings, and were thus using the string interpolation path, which does not work here.

Instead, handle both deg and rad explicitly when generating the config in JS.

Resolves issue #36608

Changelog: [General][Fixed] Resolves Animated.Value.interpolate results in NaN when output is in radians

Differential Revision: D44406034

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner fb-exported labels Mar 26, 2023
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D44406034

@analysis-bot

analysis-bot commented Mar 26, 2023

Copy link
Copy Markdown
Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,519,533 +46
android hermes armeabi-v7a 7,835,743 +38
android hermes x86 8,998,692 +51
android hermes x86_64 8,854,863 +48
android jsc arm64-v8a 9,140,865 +8
android jsc armeabi-v7a 8,333,013 +10
android jsc x86 9,194,556 +9
android jsc x86_64 9,453,649 +9

Base commit: 32e836d
Branch: main

@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D44406034

@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D44406034

Summary:
Pull Request resolved: react#36645

This broke while changing the AnimatedInterpolation back in D40571873 and D40632443, as I assumed the native side would be able to correctly handle values such as '1rad'. However these were being sent over as strings, and were thus using the string interpolation path, which does not work here.

Instead, handle both `deg` and `rad` explicitly when generating the config in JS.

Resolves issue react#36608

Changelog: [General][Fixed] Resolves Animated.Value.interpolate results in NaN when output is in radians

Reviewed By: yungsters

Differential Revision: D44406034

fbshipit-source-id: ea0eec9421b91d200024371696d4d2406a4f8767
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D44406034

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Mar 27, 2023
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request has been merged in ae0d714.

@javache javache deleted the export-D44406034 branch March 27, 2023 20:04
fortmarek pushed a commit that referenced this pull request Nov 8, 2023
Summary:
Pull Request resolved: #36645

This broke while changing the AnimatedInterpolation back in D40571873 and D40632443, as I assumed the native side would be able to correctly handle values such as '1rad'. However these were being sent over as strings, and were thus using the string interpolation path, which does not work here.

Instead, handle both `deg` and `rad` explicitly when generating the config in JS.

Resolves issue #36608

Changelog: [General][Fixed] Resolves Animated.Value.interpolate results in NaN when output is in radians

Reviewed By: yungsters

Differential Revision: D44406034

fbshipit-source-id: fe0f3df16f2b8ec6c31f9359e4706cacc72b9951
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants