import memoizeOne from "memoize-one";
import { patch } from "./position";

// TODO: memoization needed?
export default memoizeOne(function getDisplacedBy(axis, displaceBy) {
  const displacement = displaceBy[axis.line];
  return {
    value: displacement,
    point: patch(axis.line, displacement)
  };
});
