# CeilToInt(float)

> Returns the smallest integer number (cast as int) greater than or equal to f.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.7/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public static int CeilToInt(float f)
```

### Parameters

**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): Real number to round up.

### Returns

| Type                                                       | Description                               |
| ---------------------------------------------------------- | ----------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | Smallest integer number greater than `f`. |

### Remarks

When used with negative numbers, consider that values closer to 0 are considered greater than values closer to -Infinity.

Additional Resources: [Mathf.Ceil](/engine/6000.7/script-reference/unityengine/mathf/ceil.md), [Mathf.Floor](/engine/6000.7/script-reference/unityengine/mathf/floor.md), [Mathf.FloorToInt](/engine/6000.7/script-reference/unityengine/mathf/floortoint.md), [Mathf.Round](/engine/6000.7/script-reference/unityengine/mathf/round.md).

### Examples

```csharp
using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour
{
    void Start()
    {
        // Prints 10
        Debug.Log(Mathf.CeilToInt(10.0f));
        // Prints 11
        Debug.Log(Mathf.CeilToInt(10.2f));
        // Prints 11
        Debug.Log(Mathf.CeilToInt(10.7f));

        // Prints -10
        Debug.Log(Mathf.CeilToInt(-10.0f));
        // Prints -10
        Debug.Log(Mathf.CeilToInt(-10.2f));
        // Prints -10
        Debug.Log(Mathf.CeilToInt(-10.7f));
    }
}
```
