Skip to content

Commit

Permalink
Consistent signatures
Browse files Browse the repository at this point in the history
Cleanup for #1
  • Loading branch information
oculus42 committed Mar 14, 2018
1 parent be18651 commit 11b3911
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/piece.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ const removeDeadPoints = ({ points, faces }) => {

/**
* Remove any points that do not match the predicate
* @param predicate
* @param points
* @param faces
* @param {Array} points
* @param {Array} faces
* @param {function} predicate - returns true for points you want to keep.
* @return {{points: Array, faces: Array}}
*/
const filterForMatch = (predicate, { points, faces }) => {
const filterForMatch = ({ points, faces }, predicate) => {
const affectedPoints = findAffectedPoints(predicate, points);
const map = mapUniquePoints(points, affectedPoints);
const newFaces = faces.map(face => cleanFaceWithMap(map, face));
Expand All @@ -60,7 +60,6 @@ const filterForMatch = (predicate, { points, faces }) => {
};

export default {
findAffectedPoints,
filterForMatch,
removeDeadPoints,
};

0 comments on commit 11b3911

Please sign in to comment.