|
@@ -2229,6 +2229,24 @@ referencedClasses: []
|
|
}),
|
|
}),
|
|
smalltalk.Number);
|
|
smalltalk.Number);
|
|
|
|
|
|
|
|
+smalltalk.addMethod(
|
|
|
|
+smalltalk.method({
|
|
|
|
+selector: "**",
|
|
|
|
+category: 'mathematical functions',
|
|
|
|
+fn: function (exponent){
|
|
|
|
+var self=this;
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
|
+var $1;
|
|
|
|
+$1=self._raisedTo_(exponent);
|
|
|
|
+return $1;
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"**",{exponent:exponent},smalltalk.Number)})},
|
|
|
|
+args: ["exponent"],
|
|
|
|
+source: "** exponent\x0a\x09^self raisedTo: exponent",
|
|
|
|
+messageSends: ["raisedTo:"],
|
|
|
|
+referencedClasses: []
|
|
|
|
+}),
|
|
|
|
+smalltalk.Number);
|
|
|
|
+
|
|
smalltalk.addMethod(
|
|
smalltalk.addMethod(
|
|
smalltalk.method({
|
|
smalltalk.method({
|
|
selector: "+",
|
|
selector: "+",
|
|
@@ -2277,6 +2295,24 @@ referencedClasses: []
|
|
}),
|
|
}),
|
|
smalltalk.Number);
|
|
smalltalk.Number);
|
|
|
|
|
|
|
|
+smalltalk.addMethod(
|
|
|
|
+smalltalk.method({
|
|
|
|
+selector: "//",
|
|
|
|
+category: 'arithmetic',
|
|
|
|
+fn: function (aNumber){
|
|
|
|
+var self=this;
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
|
+var $1;
|
|
|
|
+$1=_st(self.__slash(aNumber))._floor();
|
|
|
|
+return $1;
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"//",{aNumber:aNumber},smalltalk.Number)})},
|
|
|
|
+args: ["aNumber"],
|
|
|
|
+source: "// aNumber\x0a\x09^(self / aNumber) floor",
|
|
|
|
+messageSends: ["floor", "/"],
|
|
|
|
+referencedClasses: []
|
|
|
|
+}),
|
|
|
|
+smalltalk.Number);
|
|
|
|
+
|
|
smalltalk.addMethod(
|
|
smalltalk.addMethod(
|
|
smalltalk.method({
|
|
smalltalk.method({
|
|
selector: "<",
|
|
selector: "<",
|
|
@@ -2413,6 +2449,54 @@ referencedClasses: []
|
|
}),
|
|
}),
|
|
smalltalk.Number);
|
|
smalltalk.Number);
|
|
|
|
|
|
|
|
+smalltalk.addMethod(
|
|
|
|
+smalltalk.method({
|
|
|
|
+selector: "arcCos",
|
|
|
|
+category: 'mathematical functions',
|
|
|
|
+fn: function (){
|
|
|
|
+var self=this;
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
|
+return Math.acos(self);;
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"arcCos",{},smalltalk.Number)})},
|
|
|
|
+args: [],
|
|
|
|
+source: "arcCos\x0a\x09<return Math.acos(self);>",
|
|
|
|
+messageSends: [],
|
|
|
|
+referencedClasses: []
|
|
|
|
+}),
|
|
|
|
+smalltalk.Number);
|
|
|
|
+
|
|
|
|
+smalltalk.addMethod(
|
|
|
|
+smalltalk.method({
|
|
|
|
+selector: "arcSin",
|
|
|
|
+category: 'mathematical functions',
|
|
|
|
+fn: function (){
|
|
|
|
+var self=this;
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
|
+return Math.asin(self);;
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"arcSin",{},smalltalk.Number)})},
|
|
|
|
+args: [],
|
|
|
|
+source: "arcSin\x0a\x09<return Math.asin(self);>",
|
|
|
|
+messageSends: [],
|
|
|
|
+referencedClasses: []
|
|
|
|
+}),
|
|
|
|
+smalltalk.Number);
|
|
|
|
+
|
|
|
|
+smalltalk.addMethod(
|
|
|
|
+smalltalk.method({
|
|
|
|
+selector: "arcTan",
|
|
|
|
+category: 'mathematical functions',
|
|
|
|
+fn: function (){
|
|
|
|
+var self=this;
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
|
+return Math.atan(self);;
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"arcTan",{},smalltalk.Number)})},
|
|
|
|
+args: [],
|
|
|
|
+source: "arcTan\x0a\x09<return Math.atan(self);>",
|
|
|
|
+messageSends: [],
|
|
|
|
+referencedClasses: []
|
|
|
|
+}),
|
|
|
|
+smalltalk.Number);
|
|
|
|
+
|
|
smalltalk.addMethod(
|
|
smalltalk.addMethod(
|
|
smalltalk.method({
|
|
smalltalk.method({
|
|
selector: "asJSON",
|
|
selector: "asJSON",
|
|
@@ -2555,6 +2639,22 @@ referencedClasses: []
|
|
}),
|
|
}),
|
|
smalltalk.Number);
|
|
smalltalk.Number);
|
|
|
|
|
|
|
|
+smalltalk.addMethod(
|
|
|
|
+smalltalk.method({
|
|
|
|
+selector: "cos",
|
|
|
|
+category: 'mathematical functions',
|
|
|
|
+fn: function (){
|
|
|
|
+var self=this;
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
|
+return Math.cos(self);;
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"cos",{},smalltalk.Number)})},
|
|
|
|
+args: [],
|
|
|
|
+source: "cos\x0a\x09<return Math.cos(self);>",
|
|
|
|
+messageSends: [],
|
|
|
|
+referencedClasses: []
|
|
|
|
+}),
|
|
|
|
+smalltalk.Number);
|
|
|
|
+
|
|
smalltalk.addMethod(
|
|
smalltalk.addMethod(
|
|
smalltalk.method({
|
|
smalltalk.method({
|
|
selector: "deepCopy",
|
|
selector: "deepCopy",
|
|
@@ -2675,6 +2775,56 @@ referencedClasses: []
|
|
}),
|
|
}),
|
|
smalltalk.Number);
|
|
smalltalk.Number);
|
|
|
|
|
|
|
|
+smalltalk.addMethod(
|
|
|
|
+smalltalk.method({
|
|
|
|
+selector: "ln",
|
|
|
|
+category: 'mathematical functions',
|
|
|
|
+fn: function (){
|
|
|
|
+var self=this;
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
|
+var $1;
|
|
|
|
+$1=self._log_(_st(self._class())._e());
|
|
|
|
+return $1;
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"ln",{},smalltalk.Number)})},
|
|
|
|
+args: [],
|
|
|
|
+source: "ln\x0a\x09^self log: self class e",
|
|
|
|
+messageSends: ["log:", "e", "class"],
|
|
|
|
+referencedClasses: []
|
|
|
|
+}),
|
|
|
|
+smalltalk.Number);
|
|
|
|
+
|
|
|
|
+smalltalk.addMethod(
|
|
|
|
+smalltalk.method({
|
|
|
|
+selector: "log",
|
|
|
|
+category: 'mathematical functions',
|
|
|
|
+fn: function (){
|
|
|
|
+var self=this;
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
|
+return Math.log(self) / Math.log(10);;
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"log",{},smalltalk.Number)})},
|
|
|
|
+args: [],
|
|
|
|
+source: "log\x0a\x09<return Math.log(self) / Math.log(10);>",
|
|
|
|
+messageSends: [],
|
|
|
|
+referencedClasses: []
|
|
|
|
+}),
|
|
|
|
+smalltalk.Number);
|
|
|
|
+
|
|
|
|
+smalltalk.addMethod(
|
|
|
|
+smalltalk.method({
|
|
|
|
+selector: "log:",
|
|
|
|
+category: 'mathematical functions',
|
|
|
|
+fn: function (aNumber){
|
|
|
|
+var self=this;
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
|
+return Math.log(self) / Math.log(aNumber);;
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"log:",{aNumber:aNumber},smalltalk.Number)})},
|
|
|
|
+args: ["aNumber"],
|
|
|
|
+source: "log: aNumber\x0a\x09<return Math.log(self) / Math.log(aNumber);>",
|
|
|
|
+messageSends: [],
|
|
|
|
+referencedClasses: []
|
|
|
|
+}),
|
|
|
|
+smalltalk.Number);
|
|
|
|
+
|
|
smalltalk.addMethod(
|
|
smalltalk.addMethod(
|
|
smalltalk.method({
|
|
smalltalk.method({
|
|
selector: "max:",
|
|
selector: "max:",
|
|
@@ -2811,6 +2961,22 @@ referencedClasses: []
|
|
}),
|
|
}),
|
|
smalltalk.Number);
|
|
smalltalk.Number);
|
|
|
|
|
|
|
|
+smalltalk.addMethod(
|
|
|
|
+smalltalk.method({
|
|
|
|
+selector: "raisedTo:",
|
|
|
|
+category: 'mathematical functions',
|
|
|
|
+fn: function (exponent){
|
|
|
|
+var self=this;
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
|
+return Math.pow(self, exponent);;
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"raisedTo:",{exponent:exponent},smalltalk.Number)})},
|
|
|
|
+args: ["exponent"],
|
|
|
|
+source: "raisedTo: exponent\x0a\x09<return Math.pow(self, exponent);>",
|
|
|
|
+messageSends: [],
|
|
|
|
+referencedClasses: []
|
|
|
|
+}),
|
|
|
|
+smalltalk.Number);
|
|
|
|
+
|
|
smalltalk.addMethod(
|
|
smalltalk.addMethod(
|
|
smalltalk.method({
|
|
smalltalk.method({
|
|
selector: "rounded",
|
|
selector: "rounded",
|
|
@@ -2827,10 +2993,52 @@ referencedClasses: []
|
|
}),
|
|
}),
|
|
smalltalk.Number);
|
|
smalltalk.Number);
|
|
|
|
|
|
|
|
+smalltalk.addMethod(
|
|
|
|
+smalltalk.method({
|
|
|
|
+selector: "sign",
|
|
|
|
+category: 'mathematical functions',
|
|
|
|
+fn: function (){
|
|
|
|
+var self=this;
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
|
+var $1,$2;
|
|
|
|
+$1=self._isZero();
|
|
|
|
+if(smalltalk.assert($1)){
|
|
|
|
+return (0);
|
|
|
|
+};
|
|
|
|
+$2=self._positive();
|
|
|
|
+if(smalltalk.assert($2)){
|
|
|
|
+return (1);
|
|
|
|
+} else {
|
|
|
|
+return (-1);
|
|
|
|
+};
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"sign",{},smalltalk.Number)})},
|
|
|
|
+args: [],
|
|
|
|
+source: "sign\x0a\x09self isZero \x0a\x09\x09ifTrue: [ ^ 0 ].\x0a\x09self positive\x0a\x09\x09ifTrue: [ ^ 1 ]\x0a\x09\x09ifFalse: [ ^ -1 ].",
|
|
|
|
+messageSends: ["ifTrue:", "isZero", "ifTrue:ifFalse:", "positive"],
|
|
|
|
+referencedClasses: []
|
|
|
|
+}),
|
|
|
|
+smalltalk.Number);
|
|
|
|
+
|
|
|
|
+smalltalk.addMethod(
|
|
|
|
+smalltalk.method({
|
|
|
|
+selector: "sin",
|
|
|
|
+category: 'mathematical functions',
|
|
|
|
+fn: function (){
|
|
|
|
+var self=this;
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
|
+return Math.sin(self);;
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"sin",{},smalltalk.Number)})},
|
|
|
|
+args: [],
|
|
|
|
+source: "sin\x0a\x09<return Math.sin(self);>",
|
|
|
|
+messageSends: [],
|
|
|
|
+referencedClasses: []
|
|
|
|
+}),
|
|
|
|
+smalltalk.Number);
|
|
|
|
+
|
|
smalltalk.addMethod(
|
|
smalltalk.addMethod(
|
|
smalltalk.method({
|
|
smalltalk.method({
|
|
selector: "sqrt",
|
|
selector: "sqrt",
|
|
-category: 'arithmetic',
|
|
|
|
|
|
+category: 'mathematical functions',
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
@@ -2846,7 +3054,7 @@ smalltalk.Number);
|
|
smalltalk.addMethod(
|
|
smalltalk.addMethod(
|
|
smalltalk.method({
|
|
smalltalk.method({
|
|
selector: "squared",
|
|
selector: "squared",
|
|
-category: 'arithmetic',
|
|
|
|
|
|
+category: 'mathematical functions',
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
@@ -2861,6 +3069,22 @@ referencedClasses: []
|
|
}),
|
|
}),
|
|
smalltalk.Number);
|
|
smalltalk.Number);
|
|
|
|
|
|
|
|
+smalltalk.addMethod(
|
|
|
|
+smalltalk.method({
|
|
|
|
+selector: "tan",
|
|
|
|
+category: 'mathematical functions',
|
|
|
|
+fn: function (){
|
|
|
|
+var self=this;
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
|
+return Math.tan(self);;
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"tan",{},smalltalk.Number)})},
|
|
|
|
+args: [],
|
|
|
|
+source: "tan\x0a\x09<return Math.tan(self);>",
|
|
|
|
+messageSends: [],
|
|
|
|
+referencedClasses: []
|
|
|
|
+}),
|
|
|
|
+smalltalk.Number);
|
|
|
|
+
|
|
smalltalk.addMethod(
|
|
smalltalk.addMethod(
|
|
smalltalk.method({
|
|
smalltalk.method({
|
|
selector: "timesRepeat:",
|
|
selector: "timesRepeat:",
|
|
@@ -3081,6 +3305,22 @@ referencedClasses: []
|
|
smalltalk.Number);
|
|
smalltalk.Number);
|
|
|
|
|
|
|
|
|
|
|
|
+smalltalk.addMethod(
|
|
|
|
+smalltalk.method({
|
|
|
|
+selector: "e",
|
|
|
|
+category: 'instance creation',
|
|
|
|
+fn: function (){
|
|
|
|
+var self=this;
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
|
+return Math.E;;
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"e",{},smalltalk.Number.klass)})},
|
|
|
|
+args: [],
|
|
|
|
+source: "e\x0a\x09<return Math.E;>",
|
|
|
|
+messageSends: [],
|
|
|
|
+referencedClasses: []
|
|
|
|
+}),
|
|
|
|
+smalltalk.Number.klass);
|
|
|
|
+
|
|
smalltalk.addMethod(
|
|
smalltalk.addMethod(
|
|
smalltalk.method({
|
|
smalltalk.method({
|
|
selector: "heliosClass",
|
|
selector: "heliosClass",
|