|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
#include <math.h> |
|
|
|
|
#include "object.h" |
|
|
|
|
|
|
|
|
|
ObjectBase* Arifm_Add(ObjectList* input) |
|
|
|
|
ObjectBase* Arifm_Add(const ObjectList* input) |
|
|
|
|
{ |
|
|
|
|
if(input->Size()!=2) return 0; |
|
|
|
|
const ObjectBase *arg1=input->At(0),*arg2=input->At(1); |
|
|
|
@ -26,7 +26,7 @@ ObjectBase* Arifm_Add(ObjectList* input)
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ObjectBase* Arifm_Sub(ObjectList* input) |
|
|
|
|
ObjectBase* Arifm_Sub(const ObjectList* input) |
|
|
|
|
{ |
|
|
|
|
if(input->Size()!=2) return 0; |
|
|
|
|
const ObjectBase *arg1=input->At(0),*arg2=input->At(1); |
|
|
|
@ -51,7 +51,7 @@ ObjectBase* Arifm_Sub(ObjectList* input)
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ObjectBase* Arifm_Mul(ObjectList* input) |
|
|
|
|
ObjectBase* Arifm_Mul(const ObjectList* input) |
|
|
|
|
{ |
|
|
|
|
if(input->Size()!=2) return 0; |
|
|
|
|
const ObjectBase *arg1=input->At(0),*arg2=input->At(1); |
|
|
|
@ -76,7 +76,7 @@ ObjectBase* Arifm_Mul(ObjectList* input)
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ObjectBase* Arifm_Div(ObjectList* input) |
|
|
|
|
ObjectBase* Arifm_Div(const ObjectList* input) |
|
|
|
|
{ |
|
|
|
|
if(input->Size()!=2) return 0; |
|
|
|
|
const ObjectBase *arg1=input->At(0),*arg2=input->At(1); |
|
|
|
@ -101,7 +101,7 @@ ObjectBase* Arifm_Div(ObjectList* input)
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ObjectBase* Arifm_Pow(ObjectList* input) |
|
|
|
|
ObjectBase* Arifm_Pow(const ObjectList* input) |
|
|
|
|
{ |
|
|
|
|
if(input->Size()!=2) return 0; |
|
|
|
|
const ObjectBase *arg1=input->At(0),*arg2=input->At(1); |
|
|
|
@ -123,7 +123,7 @@ ObjectBase* Arifm_Pow(ObjectList* input)
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ObjectBase* Arifm_Neg(ObjectList* input) |
|
|
|
|
ObjectBase* Arifm_Neg(const ObjectList* input) |
|
|
|
|
{ |
|
|
|
|
if(input->Size()!=1) return 0; |
|
|
|
|
const ObjectBase *arg=input->At(0); |
|
|
|
@ -139,7 +139,7 @@ ObjectBase* Arifm_Neg(ObjectList* input)
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ObjectBase* Arifm_Pos(ObjectList* input) |
|
|
|
|
ObjectBase* Arifm_Pos(const ObjectList* input) |
|
|
|
|
{ |
|
|
|
|
if(input->Size()!=1) return 0; |
|
|
|
|
const ObjectBase *arg=input->At(0); |
|
|
|
|