From 3482a180e7ae97075f34a969402cbd9db87897c0 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Sat, 19 Feb 2022 11:33:05 +0100 Subject: [PATCH] Add `Scalar::round` --- src/math/scalar.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/math/scalar.rs b/src/math/scalar.rs index 8b7b2507d..ccad07cb7 100644 --- a/src/math/scalar.rs +++ b/src/math/scalar.rs @@ -87,6 +87,11 @@ impl Scalar { self.0.ceil().into() } + /// Round the scalar + pub fn round(self) -> Self { + self.0.round().into() + } + /// Compute the cosine pub fn cos(self) -> Self { self.0.cos().into()