rafalab / dsbook-part-2

Repository for Advanced Data Science Book
54 stars 25 forks source link

Radians #3

Closed dpatry closed 8 months ago

dpatry commented 8 months ago

In chapter 21 - Dimension reduction you present the following for calculation of the rotation matrix:

theta <- 2pi-45/360 #convert to radians A <- matrix(c(cos(theta), -sin(theta), sin(theta), cos(theta)), 2, 2)

Is it correct to convert to radians since above (cos(theta), -sin(tetha), ...) ?

Ex: for a 45 degree... cos(45) = .70710677812 while cos(theta=2pi-45/360) = .9942295176 . Maybe I miss something in my geometry understanding...

Kind regards,

Denis

dpatry commented 8 months ago

Went back to basic geometrie and my interpretation is incorrect...