## ------------------------------------------------
## Method `Homothety$new`
## ------------------------------------------------
Homothety$new(c(1,1), 2)
## ------------------------------------------------
## Method `Homothety$getMatrix`
## ------------------------------------------------
H <- Homothety$new(c(1,1), 2)
P <- c(1,5)
H$transform(P)
H$getMatrix() %*% c(P,1)
Run the code above in your browser using DataLab