[Gambas-user] Arithmetic with objects?

Bruce adamnt42 at gmail.com
Thu Feb 25 09:15:18 CET 2021


On 25/2/21 10:43 am, Benoît Minisini wrote:
> Le 24/02/2021 à 22:57, Jussi Lahtinen a écrit :
>> Example points can be added, point(1,0) + point(0,1) = point(1,1).
>> But is there way to implement this for your own classes?
>>
>> Jussi
>>
> 
> Not in Gambas. But in a component written in C you can implement support 
> for arithmetic operators on it (look at the 'gb.gsl' or 'gb.gmp' 
> component).
> 
> Regards,
> 

If you want to DIY this mayhelp 
https://www.mathsisfun.com/geometry/area-irregular-polygons.html

regards
bruce


More information about the User mailing list