Description
Feature gate: #![feature(const_float_methods)]
This is a tracking issue for making const
some methods of floating point types.
Public API
// in `core`
impl <float> {
pub const fn recip(self) -> Self;
pub const fn to_degrees(self) -> Self;
pub const fn to_radians(self) -> Self;
pub const fn max(self, other: Self) -> Self;
pub const fn min(self, other: Self) -> Self;
pub const fn clamp(self, min: Self, max: Self) -> Self;
pub const fn abs(self) -> Self;
pub const fn signum(self) -> Self;
pub const fn copysign(self, sign: Self) -> Self;
}
Steps / History
- Implementation: Make some float methods unstable
const fn
#130568 - Final comment period (FCP)1
- Stabilization PR
Unresolved Questions
- None yet.
Footnotes
Metadata
Metadata
Assignees
Labels
Area: Constant evaluation, covers all const contexts (static, const fn, ...)Category: An issue tracking the progress of sth. like the implementation of an RFCIssue: The decision needed by the team is conjectured to be easy; this does not imply nominationRelevant to the language team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.Working group: Const evaluationThis issue / PR is in PFCP or FCP with a disposition to merge it.The final comment period is finished for this PR / Issue.