mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
document in LIBRARY, q_to_c() that was previously added
Added q_to_c(NUMBER *q) to make it easier to convert a NUMBER into an allocated COMPLEX value.
This commit is contained in:
7
LIBRARY
7
LIBRARY
@@ -653,6 +653,13 @@ The 2nd argument to c_to_q() determines if the complex argument should be freed
|
||||
or not. Pass a false value as the 2nd arg if you wish to continue to use the
|
||||
COMPLEX value.
|
||||
|
||||
To convert a NUMBER into a COMPLEX value, use:
|
||||
|
||||
COMPLEX *c;
|
||||
NUMBER *q;
|
||||
|
||||
c = q_to_c(q);
|
||||
|
||||
There are three predefined values for complex numbers. You should clink
|
||||
them when you want to use them. They are _czero_, _cone_, and _conei_.
|
||||
These have the values 0, 1, and i.
|
||||
|
Reference in New Issue
Block a user