uint64_scale_int


Description:


public uint64 uint64_scale_int (uint64 val, int num, int denom)

Scale val by the rational number num / denom, avoiding overflows and underflows and without loss of precision.

num must be non-negative and denom must be positive.

Parameters:

val

guint64 (such as a ClockTime) to scale.

num

numerator of the scale factor.

denom

denominator of the scale factor.

Returns:

val * num / denom. In the case of an overflow, this function returns G_MAXUINT64. If the result is not exactly representable as an integer, it is truncated. See also uint64_scale_int_round, uint64_scale_int_ceil, uint64_scale, uint64_scale_round, uint64_scale_ceil.


Namespace: Gst.Util
Package: gstreamer-1.0



2022 vala-language.org