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:
Landon Curt Noll
2023-10-03 01:59:00 -07:00
parent 2c4abcd2b7
commit 68e1914ee7
2 changed files with 10 additions and 0 deletions

View File

@@ -148,6 +148,9 @@ The following are the changes from calc version 2.14.3.5 to date:
a COMPLEX value that is real (imag part is 0) into a NUMBER and
optionally free the COMPLEX value. The func.c code now uses c_to_q().
Added q_to_c(NUMBER *q) to make it easier to convert a NUMBER
into an allocated COMPLEX value.
Added new vercos(x, [,eps]) for versed cosine and covercos(x, [,eps])
for inverse versed cosine.

View File

@@ -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.