# Class Reference doubleList

The doubleList class provides a list of double precision floating point numbers. More...

### Member

 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)

### Detailed Description

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.

### Member Function Documentation

##### doubleList::doubleList( )

creates a doubleList

##### doubleList::doubleList( doubleList list )

creates a doubleList with copied data from list

##### void doubleList::append(double d)

Insert d at the end of the list.

##### double doubleList::at(int i)

Returns: double at the position i

##### void doubleList::clear()

Removes all items from the list. (introduced with release 20230121)

##### bool doubleList::contains(double d)

Returns: true if the doubleList contains the number d. Otherwise false.

##### int doubleList::indexOf(double d, int index=0)

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.

##### void doubleList::insert(int pos, double value)

value is added at position pos

##### int doubleList::removeAll(double value)

Removes all occurrences of value in the list and returns the number of entries removed.

##### void doubleList::removeAt(int pos)

position pos is removed from the list

##### int doubleList::size()

Returns: number of doubles in the doubleList

##### void doubleList::set(int i, double d)

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.

##### void doubleList::swap(int pos1, int pos2)

Swaps the value at ''pos1'' and ''pos2''