WP_Duotone::colord_clamp_hue
Processes and clamps a degree (angle) value properly.
Direct port of colord's clampHue function.
Метод класса: WP_Duotone{}
Хуков нет.
Возвращает
float. The clamped hue.
Использование
$result = WP_Duotone::colord_clamp_hue( $degrees );
- $degrees(float) (обязательный)
- The hue to clamp.
Список изменений
| С версии 6.3.0 | Введена. |
Код WP_Duotone::colord_clamp_hue() WP Duotone::colord clamp hue WP 6.9
private static function colord_clamp_hue( $degrees ) {
$degrees = is_finite( $degrees ) ? $degrees % 360 : 0;
return $degrees > 0 ? $degrees : $degrees + 360;
}