Struct FixedListFloat512
An unmanaged, resizable list of float that does not allocate memory. It is 512 bytes in size, and contains all the memory it needs.
Namespace: Unity.Collections
Syntax
public struct FixedListFloat512 : IEnumerable<float>, IEnumerable, IEquatable<FixedListFloat32>, IComparable<FixedListFloat32>, IEquatable<FixedListFloat64>, IComparable<FixedListFloat64>, IEquatable<FixedListFloat128>, IComparable<FixedListFloat128>, IEquatable<FixedListFloat512>, IComparable<FixedListFloat512>, IEquatable<FixedListFloat4096>, IComparable<FixedListFloat4096>
Constructors
FixedListFloat512(FixedListFloat128)
Constructs a new FixedListFloat512 that is a copy of a FixedListFloat128.
Declaration
public FixedListFloat512(in FixedListFloat128 other)
Parameters
Type | Name | Description |
---|---|---|
FixedListFloat128 | other | The FixedListFloat128 to copy |
FixedListFloat512(FixedListFloat32)
Constructs a new FixedListFloat512 that is a copy of a FixedListFloat32.
Declaration
public FixedListFloat512(in FixedListFloat32 other)
Parameters
Type | Name | Description |
---|---|---|
FixedListFloat32 | other | The FixedListFloat32 to copy |
FixedListFloat512(FixedListFloat4096)
Constructs a new FixedListFloat512 that is a copy of a FixedListFloat4096.
Declaration
public FixedListFloat512(in FixedListFloat4096 other)
Parameters
Type | Name | Description |
---|---|---|
FixedListFloat4096 | other | The FixedListFloat4096 to copy |
FixedListFloat512(FixedListFloat64)
Constructs a new FixedListFloat512 that is a copy of a FixedListFloat64.
Declaration
public FixedListFloat512(in FixedListFloat64 other)
Parameters
Type | Name | Description |
---|---|---|
FixedListFloat64 | other | The FixedListFloat64 to copy |
Properties
Capacity
The number of items that can fit in the list.
Declaration
public int Capacity { get; }
Property Value
Type | Description |
---|---|
Int32 | The number of items that the list can hold. |
Remarks
Capacity specifies the number of items the list can currently hold. You can not change Capacity to fit more or fewer items.
Item[Int32]
Retrieve a member of the list by index.
Declaration
public float this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | The zero-based index into the list. |
Property Value
Type | Description |
---|---|
Single | The list item at the specified index. |
Exceptions
Type | Condition |
---|---|
IndexOutOfRangeException | Thrown if index is negative or >= to Length. |
Length
The current number of items in the list.
Declaration
public int Length { get; set; }
Property Value
Type | Description |
---|---|
Int32 | The item length. |
Methods
Add(Single)
Adds an element to the list.
Declaration
public void Add(float item)
Parameters
Type | Name | Description |
---|---|---|
Single | item | The float to be added at the end of the list. |
Exceptions
Type | Condition |
---|---|
IndexOutOfRangeException | Thrown if list is already full. See Capacity. |
AddNoResize(Single)
Adds an element to the list.
Declaration
public void AddNoResize(float item)
Parameters
Type | Name | Description |
---|---|---|
Single | item | The float to be added at the end of the list. |
Exceptions
Type | Condition |
---|---|
IndexOutOfRangeException | Thrown if list is already full. See Capacity. |
Clear()
Clears the list.
Declaration
public void Clear()
CompareTo(FixedListFloat128)
Compares this instance with a specified FixedListFloat128 and indicates whether this instance precedes, follows, or appears in the same position in the sort order as the specified FixedListFloat128.
Declaration
public int CompareTo(FixedListFloat128 other)
Parameters
Type | Name | Description |
---|---|---|
FixedListFloat128 | other | The specified FixedListFloat128 to compare with |
Returns
Type | Description |
---|---|
Int32 |
CompareTo(FixedListFloat32)
Compares this instance with a specified FixedListFloat32 and indicates whether this instance precedes, follows, or appears in the same position in the sort order as the specified FixedListFloat32.
Declaration
public int CompareTo(FixedListFloat32 other)
Parameters
Type | Name | Description |
---|---|---|
FixedListFloat32 | other | The specified FixedListFloat32 to compare with |
Returns
Type | Description |
---|---|
Int32 |
CompareTo(FixedListFloat4096)
Compares this instance with a specified FixedListFloat4096 and indicates whether this instance precedes, follows, or appears in the same position in the sort order as the specified FixedListFloat4096.
Declaration
public int CompareTo(FixedListFloat4096 other)
Parameters
Type | Name | Description |
---|---|---|
FixedListFloat4096 | other | The specified FixedListFloat4096 to compare with |
Returns
Type | Description |
---|---|
Int32 |
CompareTo(FixedListFloat512)
Compares this instance with a specified FixedListFloat512 and indicates whether this instance precedes, follows, or appears in the same position in the sort order as the specified FixedListFloat512.
Declaration
public int CompareTo(FixedListFloat512 other)
Parameters
Type | Name | Description |
---|---|---|
FixedListFloat512 | other | The specified FixedListFloat512 to compare with |
Returns
Type | Description |
---|---|
Int32 |
CompareTo(FixedListFloat64)
Compares this instance with a specified FixedListFloat64 and indicates whether this instance precedes, follows, or appears in the same position in the sort order as the specified FixedListFloat64.
Declaration
public int CompareTo(FixedListFloat64 other)
Parameters
Type | Name | Description |
---|---|---|
FixedListFloat64 | other | The specified FixedListFloat64 to compare with |
Returns
Type | Description |
---|---|
Int32 |
Contains(Single)
Determines whether an element is in the FixedListFloat512.
Declaration
public bool Contains(float item)
Parameters
Type | Name | Description |
---|---|---|
Single | item | The object to locate in the FixedListFloat512. |
Returns
Type | Description |
---|---|
Boolean |
Equals(Object)
Compares this instance with a specified object and indicates whether this instance is equal to the specified object.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | The specified object to compare with for equality |
Returns
Type | Description |
---|---|
Boolean |
Overrides
Equals(FixedListFloat128)
Compares this instance with a specified FixedListFloat128 and indicates whether this instance is equal to the specified FixedListFloat128.
Declaration
public bool Equals(FixedListFloat128 other)
Parameters
Type | Name | Description |
---|---|---|
FixedListFloat128 | other | The specified FixedListFloat128 to compare with for equality |
Returns
Type | Description |
---|---|
Boolean |
Equals(FixedListFloat32)
Compares this instance with a specified FixedListFloat32 and indicates whether this instance is equal to the specified FixedListFloat32.
Declaration
public bool Equals(FixedListFloat32 other)
Parameters
Type | Name | Description |
---|---|---|
FixedListFloat32 | other | The specified FixedListFloat32 to compare with for equality |
Returns
Type | Description |
---|---|
Boolean |
Equals(FixedListFloat4096)
Compares this instance with a specified FixedListFloat4096 and indicates whether this instance is equal to the specified FixedListFloat4096.
Declaration
public bool Equals(FixedListFloat4096 other)
Parameters
Type | Name | Description |
---|---|---|
FixedListFloat4096 | other | The specified FixedListFloat4096 to compare with for equality |
Returns
Type | Description |
---|---|
Boolean |
Equals(FixedListFloat512)
Compares this instance with a specified FixedListFloat512 and indicates whether this instance is equal to the specified FixedListFloat512.
Declaration
public bool Equals(FixedListFloat512 other)
Parameters
Type | Name | Description |
---|---|---|
FixedListFloat512 | other | The specified FixedListFloat512 to compare with for equality |
Returns
Type | Description |
---|---|
Boolean |
Equals(FixedListFloat64)
Compares this instance with a specified FixedListFloat64 and indicates whether this instance is equal to the specified FixedListFloat64.
Declaration
public bool Equals(FixedListFloat64 other)
Parameters
Type | Name | Description |
---|---|---|
FixedListFloat64 | other | The specified FixedListFloat64 to compare with for equality |
Returns
Type | Description |
---|---|
Boolean |
GetEnumerator()
Returns an enumerator that iterates through a container.
Declaration
public FixedListFloat512.Enumerator GetEnumerator()
Returns
Type | Description |
---|---|
FixedListFloat512.Enumerator | An IEnumerator object that can be used to iterate through the container. |
GetHashCode()
Computes a hash code summary of the FixedListFloat512.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 |
Overrides
IndexOf(Single)
Searches for the specified float and returns the zero-based index of the first occurrence within the entire FixedListFloat512.
Declaration
public int IndexOf(float item)
Parameters
Type | Name | Description |
---|---|---|
Single | item | The float to locate in the FixedListFloat512. |
Returns
Type | Description |
---|---|
Int32 |
IndexOf(Single, Int32)
Searches for the specified float and returns the zero-based index of the first occurrence within the range of elements in the FixedListFloat512 that starts at the specified index.
Declaration
public int IndexOf(float item, int index)
Parameters
Type | Name | Description |
---|---|---|
Single | item | The float to locate in the FixedListFloat512. |
Int32 | index | The zero-based starting index of the search. 0 (zero) is valid in an empty list. |
Returns
Type | Description |
---|---|
Int32 |
IndexOf(Single, Int32, Int32)
Searches for the specified float and returns the zero-based index of the first occurrence within the range of elements in the FixedListFloat512 that starts at the specified index and contains the specified number of elements.
Declaration
public int IndexOf(float item, int index, int count)
Parameters
Type | Name | Description |
---|---|---|
Single | item | The float to locate in the FixedListFloat512. |
Int32 | index | The zero-based starting index of the search. 0 (zero) is valid in an empty list. |
Int32 | count | The number of elements in the section to search. |
Returns
Type | Description |
---|---|
Int32 |
Insert(Int32, Single)
Inserts a single element into a FixedListFloat512 at a specified zero-based index.
Declaration
public void Insert(int index, float item)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | The zero-based index at which the new element should be inserted. |
Single | item | The element to insert |
InsertRange(Int32, Int32)
Inserts a number of items into a FixedListFloat512 at a specified zero-based index.
Declaration
public void InsertRange(int begin, int end)
Parameters
Type | Name | Description |
---|---|---|
Int32 | begin | The zero-based index at which the new elements should be inserted. |
Int32 | end | The zero-based index just after where the elements should be removed. |
Remove(Single)
Searches for the specified float from the begining of the FixedListFloat512 forward, removes it if possible, and returns true if the float was successfully removed.
Declaration
public bool Remove(float item)
Parameters
Type | Name | Description |
---|---|---|
Single | item | The float to locate in the FixedListFloat512 |
Returns
Type | Description |
---|---|
Boolean |
RemoveAt(Int32)
Removes the float at the specified index, and copies all subsequent elements backward to fill the hole so created.
Declaration
public void RemoveAt(int index)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | The zero-based index at which to remove the float |
RemoveAtSwapBack(Int32)
Removes an element from the FixedListFloat512 at the specified index and replaces it with the last element, which can be much faster than copying down all subsequent elements.
Declaration
public void RemoveAtSwapBack(int index)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | The zero-based index of the elements to remove. |
RemoveRange(Int32, Int32)
Removes a number of elements from a FixedListFloat512 at a specified zero-based index.
Declaration
public void RemoveRange(int begin, int end)
Parameters
Type | Name | Description |
---|---|---|
Int32 | begin | The zero-based index at which the elements should be removed. |
Int32 | end |
RemoveSwapBack(Single)
Removes the first occurrence of an item from the FixedListFloat512 and replaces it with the last element, which can be much faster than copying down all subsequent elements.
Declaration
public void RemoveSwapBack(float item)
Parameters
Type | Name | Description |
---|---|---|
Single | item | The elements to remove from the FixedListFloat512. |
Sort()
Sorts the elements in this FixedListFloat512.
Declaration
public void Sort()
ToArray()
Creates a managed Array of float that is a copy of this FixedListFloat512.
Declaration
public float[] ToArray()
Returns
Type | Description |
---|---|
Single[] |
ToNativeArray(Allocator)
Creates an unmanaged NativeArrayfloat that is a copy of this FixedListFloat512.
Declaration
public NativeArray<float> ToNativeArray(Allocator allocator)
Parameters
Type | Name | Description |
---|---|---|
Allocator | allocator | A member of the Unity.Collections.Allocator enumeration. |
Returns
Type | Description |
---|---|
NativeArray<Single> |
Operators
Equality(FixedListFloat512, FixedListFloat128)
Determines whether a FixedListFloat512 and FixedListFloat128 have the same value.
Declaration
public static bool operator ==(in FixedListFloat512 a, in FixedListFloat128 b)
Parameters
Type | Name | Description |
---|---|---|
FixedListFloat512 | a | The FixedListFloat512 to compare for equality |
FixedListFloat128 | b | The FixedListFloat128 to compare for equality |
Returns
Type | Description |
---|---|
Boolean |
Equality(FixedListFloat512, FixedListFloat32)
Determines whether a FixedListFloat512 and FixedListFloat32 have the same value.
Declaration
public static bool operator ==(in FixedListFloat512 a, in FixedListFloat32 b)
Parameters
Type | Name | Description |
---|---|---|
FixedListFloat512 | a | The FixedListFloat512 to compare for equality |
FixedListFloat32 | b | The FixedListFloat32 to compare for equality |
Returns
Type | Description |
---|---|
Boolean |
Equality(FixedListFloat512, FixedListFloat4096)
Determines whether a FixedListFloat512 and FixedListFloat4096 have the same value.
Declaration
public static bool operator ==(in FixedListFloat512 a, in FixedListFloat4096 b)
Parameters
Type | Name | Description |
---|---|---|
FixedListFloat512 | a | The FixedListFloat512 to compare for equality |
FixedListFloat4096 | b | The FixedListFloat4096 to compare for equality |
Returns
Type | Description |
---|---|
Boolean |
Equality(FixedListFloat512, FixedListFloat512)
Determines whether a FixedListFloat512 and FixedListFloat512 have the same value.
Declaration
public static bool operator ==(in FixedListFloat512 a, in FixedListFloat512 b)
Parameters
Type | Name | Description |
---|---|---|
FixedListFloat512 | a | The FixedListFloat512 to compare for equality |
FixedListFloat512 | b | The FixedListFloat512 to compare for equality |
Returns
Type | Description |
---|---|
Boolean |
Equality(FixedListFloat512, FixedListFloat64)
Determines whether a FixedListFloat512 and FixedListFloat64 have the same value.
Declaration
public static bool operator ==(in FixedListFloat512 a, in FixedListFloat64 b)
Parameters
Type | Name | Description |
---|---|---|
FixedListFloat512 | a | The FixedListFloat512 to compare for equality |
FixedListFloat64 | b | The FixedListFloat64 to compare for equality |
Returns
Type | Description |
---|---|
Boolean |
Implicit(FixedListFloat128 to FixedListFloat512)
Implicitly converts a FixedListFloat128 to a FixedListFloat512.
Declaration
public static implicit operator FixedListFloat512(in FixedListFloat128 other)
Parameters
Type | Name | Description |
---|---|---|
FixedListFloat128 | other | The FixedListFloat128 to copy |
Returns
Type | Description |
---|---|
FixedListFloat512 |
Implicit(FixedListFloat32 to FixedListFloat512)
Implicitly converts a FixedListFloat32 to a FixedListFloat512.
Declaration
public static implicit operator FixedListFloat512(in FixedListFloat32 other)
Parameters
Type | Name | Description |
---|---|---|
FixedListFloat32 | other | The FixedListFloat32 to copy |
Returns
Type | Description |
---|---|
FixedListFloat512 |
Implicit(FixedListFloat4096 to FixedListFloat512)
Implicitly converts a FixedListFloat4096 to a FixedListFloat512.
Declaration
public static implicit operator FixedListFloat512(in FixedListFloat4096 other)
Parameters
Type | Name | Description |
---|---|---|
FixedListFloat4096 | other | The FixedListFloat4096 to copy |
Returns
Type | Description |
---|---|
FixedListFloat512 |
Implicit(FixedListFloat64 to FixedListFloat512)
Implicitly converts a FixedListFloat64 to a FixedListFloat512.
Declaration
public static implicit operator FixedListFloat512(in FixedListFloat64 other)
Parameters
Type | Name | Description |
---|---|---|
FixedListFloat64 | other | The FixedListFloat64 to copy |
Returns
Type | Description |
---|---|
FixedListFloat512 |
Inequality(FixedListFloat512, FixedListFloat128)
Determines whether a FixedListFloat512 and FixedListFloat128 have different values.
Declaration
public static bool operator !=(in FixedListFloat512 a, in FixedListFloat128 b)
Parameters
Type | Name | Description |
---|---|---|
FixedListFloat512 | a | The FixedListFloat512 to compare for inequality |
FixedListFloat128 | b | The FixedListFloat128 to compare for inequality |
Returns
Type | Description |
---|---|
Boolean |
Inequality(FixedListFloat512, FixedListFloat32)
Determines whether a FixedListFloat512 and FixedListFloat32 have different values.
Declaration
public static bool operator !=(in FixedListFloat512 a, in FixedListFloat32 b)
Parameters
Type | Name | Description |
---|---|---|
FixedListFloat512 | a | The FixedListFloat512 to compare for inequality |
FixedListFloat32 | b | The FixedListFloat32 to compare for inequality |
Returns
Type | Description |
---|---|
Boolean |
Inequality(FixedListFloat512, FixedListFloat4096)
Determines whether a FixedListFloat512 and FixedListFloat4096 have different values.
Declaration
public static bool operator !=(in FixedListFloat512 a, in FixedListFloat4096 b)
Parameters
Type | Name | Description |
---|---|---|
FixedListFloat512 | a | The FixedListFloat512 to compare for inequality |
FixedListFloat4096 | b | The FixedListFloat4096 to compare for inequality |
Returns
Type | Description |
---|---|
Boolean |
Inequality(FixedListFloat512, FixedListFloat512)
Determines whether a FixedListFloat512 and FixedListFloat512 have different values.
Declaration
public static bool operator !=(in FixedListFloat512 a, in FixedListFloat512 b)
Parameters
Type | Name | Description |
---|---|---|
FixedListFloat512 | a | The FixedListFloat512 to compare for inequality |
FixedListFloat512 | b | The FixedListFloat512 to compare for inequality |
Returns
Type | Description |
---|---|
Boolean |
Inequality(FixedListFloat512, FixedListFloat64)
Determines whether a FixedListFloat512 and FixedListFloat64 have different values.
Declaration
public static bool operator !=(in FixedListFloat512 a, in FixedListFloat64 b)
Parameters
Type | Name | Description |
---|---|---|
FixedListFloat512 | a | The FixedListFloat512 to compare for inequality |
FixedListFloat64 | b | The FixedListFloat64 to compare for inequality |
Returns
Type | Description |
---|---|
Boolean |