WP_Duotone::colord_clamp_hue( float $degrees ): float

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Processes and clamps a degree (angle) value properly.

Description

Direct port of colord’s clampHue function.

Parameters

$degreesfloatrequired
The hue to clamp.

Return

float The clamped hue.

Source

private static function colord_clamp_hue( $degrees ) {
	$degrees = is_finite( $degrees ) ? $degrees % 360 : 0;
	return $degrees > 0 ? $degrees : $degrees + 360;
}

Changelog

VersionDescription
6.3.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.