---
name: "SDL_GetRectIntersectionFloat"
section: "3"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_GetRectIntersectionFloat"
---

# SDL\_GetRectIntersectionFloat(3)

Calculate the intersection of two rectangles with float precision.

## NAME

SDL\_GetRectIntersectionFloat - Calculate the intersection of two rectangles with float precision.

## HEADER FILE

Defined in SDL3/SDL\_rect.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**bool SDL\_GetRectIntersectionFloat(const SDL\_FRect \*A, const SDL\_FRect \*B, SDL\_FRect \*result);**

## DESCRIPTION

If **result** is NULL then this function will return false.

## FUNCTION PARAMETERS

- *A*

  an  **SDL\_FRect**\
    structure representing the first rectangle.

- *B*

  an  **SDL\_FRect**\
    structure representing the second rectangle.

- *result*

  an  **SDL\_FRect**\
    structure filled in with the intersection of rectangles **A** and **B** .

## RETURN VALUE

Returns true if there is an intersection, false otherwise.

## AVAILABILITY

This function is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_HasRectIntersectionFloat**(3)](/SDL_HasRectIntersectionFloat/3.md)
