Skip to content

Commit

Permalink
plot a vector in oposite direction only if flag antipodal is set
Browse files Browse the repository at this point in the history
  • Loading branch information
ralfHielscher committed Nov 2, 2019
1 parent 707f714 commit a90eb88
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions geometry/@vector3d/quiver3.m
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@
v = v.*1.05;

h = optiondraw(quiver3(v.x,v.y,v.z,d.x,d.y,d.z,options{:}),varargin{:});
d = -d;
h = optiondraw(quiver3(v.x,v.y,v.z,d.x,d.y,d.z,options{:}),varargin{:});
if d.antipodal
d = -d;
h = [h,optiondraw(quiver3(v.x,v.y,v.z,d.x,d.y,d.z,options{:}),varargin{:})];
end

% finalize the plot
axis equal off
Expand Down

0 comments on commit a90eb88

Please sign in to comment.