gstfloatcast

## gstfloatcast gstfloatcast — Floating point platform independence macros |

## Synopsis

    #include <gst/floatcast/floatcast.h>

    #define             gst_cast_double                     (x)
    #define             gst_cast_float                      (x)

## Description

The floatcast.h header file contains a couple of convenience macros for floating point numbers.

If you include this header, your application or library must link against libm (for maths.h support).

For optimal results, your application's or library's build system should check whether the C99 functions lrint and lrintf are supported and define the preprocessor symbols HAVE_LRINT and HAVE_LRINTF if so. If you are using autoconf, you can do this by using the AC_C99_FUNC_LRINT and AC_C99_FUNC_LRINTF checks in your configure.ac or configure.in file and including your application's config.h header before you include floatcast.h.

## Details

### gst_cast_double()

    #define             gst_cast_double(x)

Casts a 64-bit floating point value (double) to an integer without bias.

`x` : | input value

### gst_cast_float()

    #define             gst_cast_float(x)

Casts a 32-bit floating point value (float) to an integer without bias.

`x` : | input value