INNER CODE UNIT · TypeScript
invert
terrysahaidak/react-native-gallery-toolkit · packages/common/src/vectors.ts:144
export const invert = <T extends Vector<any>>(vector: T) => {
'worklet';
return {
x: _get(vector.x) * -1,
y: _get(vector.y) * -1,
};
};
type Callback = () => any;
export const set = <T extends VectorType>(
vector: T,
value: VectorType | SharedValueType | Callback,
) => {
'worklet';
// handle animation