ProjectMOSAIC / mosaicCalc

Calculus in R
12 stars 4 forks source link

antiD() drops default argument values #18

Open rpruim opened 1 year ago

rpruim commented 1 year ago

Is this intended behavior?

suppressPackageStartupMessages(library(mosaicCalc))
k <- makeFun( 1 - x^2 ~ x )
K <- antiD( k(x) ~ x )
area <- K(1) - K(-1); area 
#> [1] 1.333333
f <- makeFun( (1 - x^2)/A ~ x, A = area )
F <- antiD(f(x) ~ x)
f
#> function (x, A = 1.33333333333333) 
#> (1 - x^2)/A
F
#> function (x, A, C = 0) 
#> (3 * x * A - x^3 * A)/(3 * A^2) + C

Created on 2022-12-26 with reprex v2.0.2

dtkaplan commented 1 year ago

Thanks for pointing this out. It is now fixed in the master branch, version 0.6.0.9001.

rpruim commented 1 year ago

Glad it was a quick fix.