You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: ptriside.m
    path of file: ./repos/fieldtrip/plotting/private
    
    the code of the file until where you have to start completion: function [side] = ptriside(v1, v2, v3, r, tolerance)

% PTRISIDE determines the side of a plane on which a set of points lie. It
% returns 0 for the points that lie exactly on the plane.
%
% [side] = ptriside(v1, v2, v3, r)
% 
% the side of points r is determined relative to the plane spanned by

    
function [side] = ptriside(v1, v2, v3, r, tolerance)

% PTRISIDE determines the side of a plane on which a set of points lie. It
% returns 0 for the points that lie exactly on the plane.
%
% [side] = ptriside(v1, v2, v3, r)
% 
% the side of points r is determined relative to the plane spanned by
% vertices v1, v2 and v3. v1,v2 and v3 should be 1x3 vectors. r should be a
% Nx3 matrix

% Copyright (C) 2002, Robert Oostenveld
%
% $Log: ptriside.m,v $
% Revision 1.3  2003/03/11 15:35:20  roberto
% converted all files from DOS to UNIX
%
% Revision 1.2  2003/03/04 21:46:19  roberto
% added CVS log entry and synchronized all copyright labels
%

if nargin<5
  tolerance = 100*eps;
end