24d23
< var rotdeg=0.0, rotdegr=0.0;
56,64d54
< function moresigns() {
< if (eval('' + signs.length) == 4) {
< signs.push('%');
< document.getElementById('ssign').innerHTML+='';
< signs.push('^');
< document.getElementById('ssign').innerHTML+='';
< }
< }
<
83,84d72
< //rotdeg+=eval('' + ('' + inval).replace('deg',''));
< //rotdeg=eval(rotdeg % 360.0);
114d101
< rotdeg=eval(Math.floor(eval(360.0 * numerator / denominator)) % 360);
130d116
< rotdegr=eval(Math.floor(eval(360.0 * numeratortwo / denominatortwo)) % 360);
150d135
< rotdeg=0;
157d141
< rotdegr=0;
161,162c145,146
< document.getElementById('dstyle').innerHTML+='';
< document.getElementById('dstyle').innerHTML+='';
---
> document.getElementById('dstyle').innerHTML+='';
> document.getElementById('dstyle').innerHTML+='';
195d178
< var myrealans=' = ' + realans;
232,240d214
< } else if (document.getElementById('ssign').value == '%') {
< varw+=' = (' + numerator + ' / ' + denominator.slice(-1) + ') % (' + numeratortwo + ' / ' + denominatortwo + ')' + String.fromCharCode(10);
< varw+=' = ' + eval('(' + numerator + ' / ' + denominator.slice(-1) + ') % (' + numeratortwo + ' / ' + denominatortwo + ')');
< myrealans='';
< } else if (document.getElementById('ssign').value == '^') {
< varw+=' = (' + numerator + ' / ' + denominator.slice(-1) + ') ^ (' + numeratortwo + ' / ' + denominatortwo + ')' + String.fromCharCode(10);
< // alert('' + eval('(' + numerator + ' / ' + denominator.slice(-1) + ')') + ' to the power of ' + eval('(' + numeratortwo + ' / ' + denominatortwo + ')') + ' is ' + Math.pow(eval('(' + numerator + ' / ' + denominator.slice(-1) + ')'), eval('(' + numeratortwo + ' / ' + denominatortwo + ')')));
< varw+=' = ' + Math.pow(eval('(' + numerator + ' / ' + denominator.slice(-1) + ')'), eval('(' + numeratortwo + ' / ' + denominatortwo + ')'));
< myrealans='';
242,251c216,217
< if (('' + myrealans).indexOf('.') == -1 && myrealans != '') { myrealans='' + myrealans + '.0'; }
< return emojiize(outstr + String.fromCharCode(10) + varw + myrealans + ' ' + String.fromCharCode(10));
< }
<
< function oureval(ineq) {
< var ineqs=ineq.split('^');
< if (eval('' + ineqs.length) >= 2) {
< return Math.pow(eval(ineqs[0].replace('((','(')), eval(eval(ineqs[1].replace('))',')'))));
< }
< return eval(ineq);
---
> if (('' + realans).indexOf('.') == -1) { realans='' + realans + '.0'; }
> return emojiize(outstr + String.fromCharCode(10) + varw + ' = ' + realans + ' ' + String.fromCharCode(10));
256,257c222
< var ans='', sufans=' Enter + to solve fractional equations (+-x/) or ++ to solve (+-x/%^). Enter @ to toggle among conic and linear and radial gradient and SVG circle and rectangle display. Enter nothing with OK will reshow "cake".';
< rotdeg=0.0;
---
> var ans='', sufans=' Enter + to solve fractional equations. Enter @ to toggle among conic and linear and radial gradient and SVG circle and rectangle display. Enter nothing with OK will reshow "cake".';
267c232
< if (('' + ans).trim().substring(0,1) == '+') { if (('' + ans).indexOf('++') != -1) { moresigns(); } eqmode=true; sufans=' Enter - to just solve leftmost fractional question. Enter @ to toggle among conic and linear and radial gradient and SVG circle and rectangle display.'; document.getElementById('myrtd').style.display='table-cell'; document.getElementById('mymtd').style.display='table-cell'; isign=eval(0 + Math.floor(Math.random() * signs.length)); document.getElementById('ssign').value=signs[isign]; setTimeout(ask,2000); return ''; }
---
> if (('' + ans).trim() == '+') { eqmode=true; sufans=' Enter - to just solve leftmost fractional question. Enter @ to toggle among conic and linear and radial gradient and SVG circle and rectangle display.'; document.getElementById('myrtd').style.display='table-cell'; document.getElementById('mymtd').style.display='table-cell'; isign=eval(0 + Math.floor(Math.random() * signs.length)); document.getElementById('ssign').value=signs[isign]; setTimeout(ask,2000); return ''; }
306c271
< if (ans.replace(/\ /g,'').replace(/x/g,'*') == ('' + numerator + '/' + denominator.substring(1) + document.getElementById('ssign').value.replace('x','*') + numeratortwo + '/' + denominatortwo).replace(/\ /g,'').replace(/x/g,'*') || Math.abs(eval('(' + numerator + '/' + denominator.substring(1) + ') ' + document.getElementById('ssign').value.replace('x','*') + ' (' + numeratortwo + '/' + denominatortwo + ')') - oureval(('' + ans).replace(/x/g, '*'))) < 0.005) {
---
> if (ans.replace(/\ /g,'').replace(/x/g,'*') == ('' + numerator + '/' + denominator.substring(1) + document.getElementById('ssign').value.replace('x','*') + numeratortwo + '/' + denominatortwo).replace(/\ /g,'').replace(/x/g,'*') || Math.abs(eval('(' + numerator + '/' + denominator.substring(1) + ') ' + document.getElementById('ssign').value.replace('x','*') + ' (' + numeratortwo + '/' + denominatortwo + ')') - eval(('' + ans).replace(/x/g, '*'))) < 0.005) {
318c283
< if (ans == '' + numerator + '/' + denominator.substring(1) || Math.abs(eval('' + numerator + '/' + denominator.substring(1)) - oureval(('' + ans).replace(/x/g, '*'))) < 0.005) {
---
> if (ans == '' + numerator + '/' + denominator.substring(1) || Math.abs(eval('' + numerator + '/' + denominator.substring(1)) - eval(('' + ans).replace(/x/g, '*'))) < 0.005) {