Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128581 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id 9A5591A00BC for ; Thu, 28 Aug 2025 10:59:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1756378691; bh=rsCaQKkAGOB4XapHKxKHiYGmyzBNgDt2tyl8HD2c6BI=; h=Date:Subject:To:References:From:In-Reply-To:From; b=RjUBJ+QskJ31vxNSf6VLVmJi44zJHBFgotznYala4/xqoR+u9QszMZYTHqlMaAkvY IIhS5QfTom4shBLqAanlxntUbKdeSE4jZiNkY5g3qlRuu8aMdxduvdkl5MhwbfrMnY I7ZdBZ0t4TKKjTDB/GraBY6E9kGcCaOppCiYDK83WtNdcO9ggXlClJF7FTy6C2uZ8E u52tEW9Sx9s0mAxpZYPAw+LSAONgho3/8mIXm/5v0YpUdcE7BD9zoSeG1WPy9b60hZ jMVa/g6OMWCyY8HJnXN+Om4j66NCp13n/8P+eBQGDXrB8ikrEvbYafNX79fj2U7hSu AzEELmSgKhJgQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2027618003F for ; Thu, 28 Aug 2025 10:58:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,DMARC_MISSING, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from emily.smtp.mailx.hosts.net.nz (emily.smtp.mailx.hosts.net.nz [43.245.52.179]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 28 Aug 2025 10:58:07 +0000 (UTC) Received: from 122-57-11-211-adsl.sparkbb.co.nz ([122.57.11.211] helo=[192.168.1.67]) by emily.smtp.mailx.hosts.net.nz with esmtpsa authed as varteg.nz (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_128_GCM:128) (Exim 4.96) (envelope-from ) id 1uraLw-0019VK-0w for internals@lists.php.net; Thu, 28 Aug 2025 22:59:36 +1200 Message-ID: <32e94a0f-2e2b-48f3-90a0-ad0096608809@varteg.nz> Date: Thu, 28 Aug 2025 22:59:27 +1200 Precedence: list list-help: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PHP-DEV] [RFC] [Discussion] Add clamp function To: internals@lists.php.net References: <1756361767126.3727989781.4204927711@yahoo.de> <3b1bd29cd42074b499d38e10cb97bf42@bastelstu.be> Content-Language: en-GB In-Reply-To: <3b1bd29cd42074b499d38e10cb97bf42@bastelstu.be> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Hosts-DKIM-Check: none From: Weedpacket@varteg.nz (Morgan) On 2025-08-28 19:37, Tim Düsterhus wrote: > > There's precedent in ext/random with the Randomizer::getFloat() method > that takes a Random\IntervalBoundary enum to decide on the the > interpretation of the boundary values. Translated to `clamp()` this > could mean: > If it weren't living in the Random extension, that very Enum could have been used.