From 22527df1714c83e968913dabba4ba3ec81adc20c Mon Sep 17 00:00:00 2001 From: Karen Sargsyan Date: Sat, 21 May 2016 18:00:59 +0800 Subject: Some basic math functions: pow, sqrt, sin, cos, log, exp are added to work at client and server sides --- lib/js/urweb.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'lib/js') diff --git a/lib/js/urweb.js b/lib/js/urweb.js index 410a0e23..7842775b 100644 --- a/lib/js/urweb.js +++ b/lib/js/urweb.js @@ -116,7 +116,25 @@ function pow(n, m) { return Math.pow(n, m); } +function sqrt(n){ + return Math.sqrt(n); +} + +function sin(n){ + return Math.sin(n); +} + +function cos(n){ + return Math.cos(n); +} + +function log(n){ + return Math.log(n); +} +function exp(n){ + return Math.exp(n); +} // Time, represented as counts of microseconds since the epoch var time_format = "%c"; -- cgit v1.2.3