# Ceil(float)

> Returns the smallest integer number greater than or equal to f.

## Definition

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

```csharp
public static float Ceil(float f)
```

### Parameters

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

### Returns

| Type                                                          | Description                               |
| ------------------------------------------------------------- | ----------------------------------------- |
| [float](https://learn.microsoft.com/dotnet/api/system.single) | 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.CeilToInt](/engine/6000.7/script-reference/unityengine/mathf/ceiltoint.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.0f
        Debug.Log(Mathf.Ceil(10.0f));
        // Prints 11.0f
        Debug.Log(Mathf.Ceil(10.2f));
        // Prints 11.0f
        Debug.Log(Mathf.Ceil(10.7f));

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