New useful features in math parser, planned in 2.9.8

New changes also planed in the math parser, for 2.9.8 :

  • New functions deg2rad() and rad2deg() converts angles specified in degrees to radians (and vice versa).
  • New postfix operator ° (UTF8-symbol for degrees) can be added to convert an angle in degrees to radians, as in the expression cos(45°) (eq. to cos(deg2rad(45)) or cos(45*pi/180) ).
  • Functions rot() and ellipse() now consider that their angle arguments are specified in radians instead of degrees (just like the other trigonometric functions in the math parser).

All this avoids to add a bunch of new functions as cosd(), sind(), ... (as done in R, Matlab, etc.)
This may requires some changes in your scripts anyway (even if I tried to make the change myself).

1 Like