Last active
October 14, 2018 17:11
-
-
Save zachgibson/5390fee7f11b6a4692741e4e16f411e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Animated from "react-native-reanimated"; | |
const { add, sub, abs } = Animated; | |
this.xyVal = add( | |
abs(sub(props.left + TILE_WIDTH / 2 - width / 2, props.x)), | |
abs(sub(props.top + TILE_HEIGHT / 2 - height / 2, props.y)) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment