[GB.GSL]
* NEW: Add Complex.Neg() to return the negative of a complex number. * NEW: Add Complex.Inv() to return the inverse of a complex number. git-svn-id: svn://localhost/gambas/trunk@4923 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
c89b8a5011
commit
ad823d98cf
1 changed files with 3 additions and 8 deletions
|
@ -277,13 +277,6 @@ BEGIN_METHOD_VOID(Complex_Copy)
|
|||
END_METHOD
|
||||
|
||||
|
||||
BEGIN_METHOD_VOID(Complex_Conj)
|
||||
|
||||
GB.ReturnObject(COMPLEX_create(gsl_complex_rect(THIS->number.dat[0], -THIS->number.dat[1])));
|
||||
|
||||
END_METHOD
|
||||
|
||||
|
||||
BEGIN_METHOD(Complex_Polar, GB_FLOAT real; GB_FLOAT imag)
|
||||
|
||||
GB.ReturnObject(COMPLEX_create(gsl_complex_polar(VARG(real), VARG(imag))));
|
||||
|
@ -489,7 +482,9 @@ GB_DESC ComplexDesc[] =
|
|||
GB_STATIC_METHOD("_call", "Complex", Complex_call, "[(Real)f(Imag)f]"),
|
||||
GB_METHOD("Copy", "Complex", Complex_Copy, NULL),
|
||||
GB_STATIC_METHOD("Polar", "Complex", Complex_Polar, "[(Real)f(Imag)f]"),
|
||||
GB_METHOD("Conj", "Complex", Complex_Conj, NULL),
|
||||
GB_METHOD("Conj", "Complex", Complex_Conjugate, NULL),
|
||||
GB_METHOD("Neg", "Complex", Complex_Negative, NULL),
|
||||
GB_METHOD("Inv", "Complex", Complex_Inverse, NULL),
|
||||
//GB_METHOD("Set", NULL, Complex_Set, "[(Real)f(Imag)f]"),
|
||||
|
||||
// Properties
|
||||
|
|
Loading…
Reference in a new issue