Plugin can be activated either by menu or by pressing the HotKey Ctrl+'
You can use all JavaScript Math Object Methods in your mathematical expression with or without preceding it with "Math."
abs(x), acos(x), asin(x), atan(x), atan2(y,x), ceil(x), cos(x), exp(x), floor(x), log(x), max(x,y,z,...,n), min(x,y,z,...,n), pow(x,y), random(), round(x), sin(x), sqrt(x) and tan(x)
Example: pow(6,8) or Math.pow(6,8)
The following Math Constants are also valid: E, LN2, LN10, LOG2E, LOG10E, PI, SQRT1_2, SQRT2
How it works:
- If you make a SELECTION and activate the plugin, the SELECTION will be evaluated and the REPLACED by the mathematical result.
If the line ENDS with a "=" sign, anything on the LEFT of the "=" will be evaluated and the result will be INSERTED after the "=" sign.
Otherwise, if the line CONTAINS a "=" sign, anything on the RIGHT of the "=" will be evaluated and the REPLACED by the mathematical result.
Example Screencapture video:
Installation:
1) Download plugin .ZIP file.
2) Open WeBuilder and select "Plugins -> Manage Plugins" from the menu.
3) Click "Install" and select the .ZIP file you downloaded in step 1.
History
v1.0 - Uses Webkit engine to evaluate math expression.
v2.0 - Rewrite. Now uses MSScriptControl to evaluate math expression (MUCH faster than using WebKit). - Improved Undo functionality. - Added support for Math Constants. - Added icon.
Feedback appreciated.
(I only use WeBuilder, so I haven't tested if it works in HTMLPad, Rapid CSS or Rapid PHP.)