Skip to content

Commit

Permalink
refactor(code): use ternary op in comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigobasilio2022 committed Nov 14, 2023
1 parent b8f5179 commit 6bae188
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions Sources/Rendering/Core/CellPicker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,20 +208,14 @@ function vtkCellPicker(publicAPI, model) {
p2
);

if (interceptionObject) {
t1 =
interceptionObject.t1 < clipLine.t1
? clipLine.t1
: interceptionObject.t1;

t2 =
interceptionObject.t2 > clipLine.t2
? clipLine.t2
: interceptionObject.t2;
} else {
t1 = clipLine.t1;
t2 = clipLine.t2;
}
t1 =
interceptionObject?.t1 > clipLine.t1
? interceptionObject.t1
: clipLine.t1;
t2 =
interceptionObject?.t2 < clipLine.t2
? interceptionObject.t2
: clipLine.t2;

tMin = publicAPI.intersectVolumeWithLine(p1, p2, t1, t2, tol, actor);
} else if (mapper.isA('vtkMapper')) {
Expand Down

0 comments on commit 6bae188

Please sign in to comment.