fn clamp_to<D>(d: f64) -> DExpand description
WebIDL ConvertToInt (Clamp) conversion. Spec: https://webidl.spec.whatwg.org/#abstract-opdef-converttoint
This function is ported from Gecko’s
PrimitiveConversionTraits_Clamp.
§Warning
This function must only be used when the target type D represents an
integer WebIDL type. Using it with non-integer types would be incorrect.