Luce packages
LuceLuce BaseLuciaOS

dymokomi/luce-browser-engine

Source of release 0.6.0

0.6.0 / src / web / css / numeric_range.lucb

#==============================================================================================
#
#   numeric_range - NumericRange: the accepted range of a numeric value
#
#   DESCRIPTION:
#       Port of LibWeb/CSS/NumericRange.h (lines 1-28): NumericRange::contains. The four
#       constexpr ranges are constants in types_numeric_range.
#
#       Copyright (c) 2025, Callum Law <callumlaw1709@outlook.com>
#       SPDX-License-Identifier: BSD-2-Clause
#
#==============================================================================================

## Ported from Libraries/LibWeb/CSS/NumericRange.h:17 Web::CSS::NumericRange::contains.
pub func css_numeric_range_contains(this: const CssNumericRange*, value: f64) -> bool:
    return value >= this.min and value <= this.max