The doubleList class provides a list of double precision floating point numbers. More...
doubleList( ) | |
doubleList( doubleList list ) | |
void | append(double d) |
double | at(int i) |
void | clear() |
bool | contains(double d) |
int | indexOf(double d, int index=0) |
void | insert(int pos, double value) |
int | removeAll(double value) |
void | removeAt(int pos) |
int | size() |
void | set(int i, double d) |
void | swap(int pos1, int pos2) |
The doubleList class provides a list of double precision floating point numbers. It can be used in combination with c++ arrays of the type double. That means any double array created in a macro is also a doubleList and visa versa.
double doubleArray[10];
doubleArray[5]=10.5;
doubleAttay.at(6)=6.5;
if (doubleArray.contains(6.5) {
//...
}
In LayoutScript the list differs from the build in lists.
creates a doubleList
creates a doubleList with copied data from list
Insert d at the end of the list.
Returns: double at the position i
Removes all items from the list. (introduced with release 20230121)
Returns: true if the doubleList contains the number d. Otherwise false.
Returns: the index position of the first occurrence of the double ''d'' in this list, searching forward from index position from. Returns -1 if d is not found.
value is added at position pos
Removes all occurrences of value in the list and returns the number of entries removed.
position pos is removed from the list
Returns: number of doubles in the doubleList
Sets the ith entry of the list to d. The first entry of the list starts with 0. It will have no effect, if the list did not have a size of i.
Swaps the value at ''pos1'' and ''pos2''