Class Format
Format utility class for floats that truncates string representation to a certain precision for logging.
Namespace: Unity.Simulation
Syntax
public static class Format
Methods
Floats(Single[], Int32, Int32)
Formats the floats input as per given precision and stride.
Declaration
public static string Floats(float[] floats, int stride = 0, int precision = 3)
Parameters
Type | Name | Description |
---|---|---|
Single[] | floats | Input float array |
Int32 | stride | Number of floating points in a single stride. |
Int32 | precision | Precision for floating point numbers. |
Returns
Type | Description |
---|---|
String | Formatted string of floating point numbers. |