We can utilize useful mathematical functions in C/C++ by including math.h
or cmath
library. However, it is hard to recognize the full functionality of the function at a glance if the function call is deep and complex. The indirect function signature also reduces cognition. For example, it is hard to know the mathematical meaning of the following code:
log(sinf(atan2f(hypot(abs(a + b), abs(c)), d + f)).
This is inefficient!! It will be better to show the functionality with common math formula form:
Therefore, I implemented the plugin in which the users can directly see the following formula, driven by the overlapped math function.
Quite intuitive. First, write the c or c++ code with the functions & constants from c math libraries. And if you point the math function with the mouse, the plugin parses the function and its arguments recursively and hovers the generated Unicode-style math formula.
abs
labs
llabs
fabs
fabsf
fabsl
cabs
cabsf
cabsl
exp
expf
expl
exp2
exp2f
exp2l
expm1
expm1f
expm1l
ldexp
ldexpf
ldexpl
log
logf
logl
log2
log2f
log2l
log10
log10f
log10l
log1p
log1pf
log1pl
ceil
ceilf
ceill
floor
floorf
floorl
trunc
truncf
truncl
round
roundf
roundl
lround
lroundf
lroundl
llround
llroundf
llroundl
sqrt
sqrtf
sqrtl
cbrt
cbrtf
cbrtl
hypot
hypotf
hypotl
sin
sinf
sinl
cos
cosf
cosl
tan
tanf
tanl
asin
asinf
asinl
acos
acosf
acosl
atan
atanf
atanl
sinh
sinhf
sinhl
cosh
coshf
coshl
tanh
tanhf
tanhl
csinh
csinhf
csinhl
ccosh
ccoshf
ccoshl
ctanh
ctanhf
ctanhl
asinh
asinhf
asinhl
acosh
acoshf
acoshl
atanh
atanhf
atanhl
casinh
casinhf
casinhl
cacosh
cacoshf
cacoshl
catanh
catanhf
catanhl
atan2
atan2f
atan2l
erf
erff
erfl
erfc
erfcf
erfcl
tgamma
tgammaf
tgammal
lgamma
lgammaf
lgammal
Initial release of the plugin Hovers generated math formula when the user points certain math function
Real Ready for the release (cleanup code, add logo, eliminate unneccesary functionalities)
- viewing latex style formula
- Support more language (java, python...)