RobinHankin / clifford

https://robinhankin.github.io/clifford/
5 stars 0 forks source link

dual number vignette definition of division #96

Closed RobinHankin closed 8 months ago

RobinHankin commented 8 months ago

In file inst/dual_numbers_clifford.Rmd I use a binary operator %/% for division. But it might be better to use S3 generics, something like this:

library("clifford")
#> 
#> Attaching package: 'clifford'
#> The following object is masked from 'package:stats':
#> 
#>     terms
#> The following object is masked from 'package:methods':
#> 
#>     signature
#> The following object is masked from 'package:base':
#> 
#>     %o%
`/.clifford` <- function(x,y){"division by cliff"}
rcliff() / rcliff()
#> [1] "division by cliff"

Created on 2024-03-18 with reprex v2.1.0