friendly / matlib

Matrix Functions for Teaching and Learning Linear Algebra and Multivariate Statistics
http://friendly.github.io/matlib/
65 stars 16 forks source link

Minor bugfix for a pair of missing parentheses in arrows3d #24

Closed douglaswhitaker closed 5 years ago

douglaswhitaker commented 5 years ago

Dropped parentheses results in some incorrect vector lengths of 0. This would lead to correct segments being drawn but no cones in subsequent arrows3d calls. Example of what this fixes:

open3d() wgl 1 vectors3d(c(4,-1,3),origin=c(2,2,2)) # error thrown, correct segment graphed but no cone Error in if (angle == 0) return(identityMatrix()) : missing value where TRUE/FALSE needed

friendly commented 5 years ago

Thanks!