# FormatFloat(float, int)

> Formats a given float as a string.

## Definition

* **Type:** Method
* **Namespace:** [Unity.ProjectAuditor.Editor.Utils](/engine/6000.7/script-reference/unity/projectauditor/editor/utils.md)
* **Assembly:** UnityEditor

```csharp
public static string FormatFloat(float val, int decimalPlaces)
```

### Parameters

**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): Value to format.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Number of decimal places to print.

### Returns

| Type                                                           | Description                                            |
| -------------------------------------------------------------- | ------------------------------------------------------ |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | A string representation of the input value as a float. |
