#include <algorithm>
#include <limits>
#include <type_traits>
#include "flutter/fml/logging.h"
#include "impeller/geometry/scalar.h"
Go to the source code of this file.
|
#define | ONLY_ON_SIGNED_INT_RET(Type, Ret) |
|
#define | ONLY_ON_SIGNED_INT(Type) ONLY_ON_SIGNED_INT_RET(Type, Type) |
|
#define | ONLY_ON_FLOAT_RET(Type, Ret) |
|
#define | ONLY_ON_FLOAT(Type) ONLY_ON_FLOAT_RET(Type, Type) |
|
#define | ONLY_ON_FLOAT_TO_SIGNED_INT_RET(FPType, SIType, Ret) |
|
#define | ONLY_ON_FLOAT_TO_SIGNED_INT(FPType, SIType) ONLY_ON_FLOAT_TO_SIGNED_INT_RET(FPType, SIType, SIType) |
|
#define | ONLY_ON_DIFFERING_FLOAT_RET(FPType1, FPType2, Ret) |
|
#define | ONLY_ON_DIFFERING_FLOAT(FPType1, FPType2) ONLY_ON_DIFFERING_FLOAT_RET(FPType1, FPType2, FPType2) |
|
#define | ONLY_ON_SAME_TYPES_RET(Type1, Type2, Ret) |
|
#define | ONLY_ON_SAME_TYPES(Type1, Type2) ONLY_ON_SAME_TYPES_RET(Type1, Type2, Type2) |
|
◆ ONLY_ON_DIFFERING_FLOAT
◆ ONLY_ON_DIFFERING_FLOAT_RET
#define ONLY_ON_DIFFERING_FLOAT_RET |
( |
|
FPType1, |
|
|
|
FPType2, |
|
|
|
Ret |
|
) |
| |
Value: template <typename FPType1, typename FPType2> \
constexpr inline std::enable_if_t<std::is_floating_point_v<FPType1> && \
std::is_floating_point_v<FPType2> && \
!std::is_same_v<FPType1, FPType2>, \
Ret>
Definition at line 42 of file saturated_math.h.
◆ ONLY_ON_FLOAT
◆ ONLY_ON_FLOAT_RET
#define ONLY_ON_FLOAT_RET |
( |
|
Type, |
|
|
|
Ret |
|
) |
| |
Value: template <typename Type> \
constexpr inline std::enable_if_t<std::is_floating_point_v<Type>, Ret>
Definition at line 30 of file saturated_math.h.
◆ ONLY_ON_FLOAT_TO_SIGNED_INT
◆ ONLY_ON_FLOAT_TO_SIGNED_INT_RET
#define ONLY_ON_FLOAT_TO_SIGNED_INT_RET |
( |
|
FPType, |
|
|
|
SIType, |
|
|
|
Ret |
|
) |
| |
Value: template <typename FPType, typename SIType> \
constexpr inline std::enable_if_t< \
std::is_floating_point_v<FPType> && is_signed_integral_v<SIType>, Ret>
Definition at line 35 of file saturated_math.h.
◆ ONLY_ON_SAME_TYPES
◆ ONLY_ON_SAME_TYPES_RET
#define ONLY_ON_SAME_TYPES_RET |
( |
|
Type1, |
|
|
|
Type2, |
|
|
|
Ret |
|
) |
| |
Value: template <typename Type1, typename Type2> \
constexpr inline std::enable_if_t<std::is_same_v<Type1, Type2>, Ret>
Definition at line 51 of file saturated_math.h.
◆ ONLY_ON_SIGNED_INT
◆ ONLY_ON_SIGNED_INT_RET
#define ONLY_ON_SIGNED_INT_RET |
( |
|
Type, |
|
|
|
Ret |
|
) |
| |
Value: template <typename Type> \
constexpr inline std::enable_if_t<is_signed_integral_v<Type>, Ret>
Definition at line 25 of file saturated_math.h.