File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -189,6 +189,50 @@ macro_rules! qty_ctor {
189189
190190 impl $typename {
191191 qty_ctor!( @impl $( $rest) * ) ;
192+
193+ pub fn abs( & self ) -> Self {
194+ Self {
195+ value: self . value. abs( ) ,
196+ }
197+ }
198+
199+ pub fn floor( & self ) -> Self {
200+ Self {
201+ value: self . value. floor( ) ,
202+ }
203+ }
204+
205+ pub fn ceil( & self ) -> Self {
206+ Self {
207+ value: self . value. ceil( ) ,
208+ }
209+ }
210+
211+ pub fn round( & self ) -> Self {
212+ Self {
213+ value: self . value. round( ) ,
214+ }
215+ }
216+
217+ pub fn trunc( & self ) -> Self {
218+ Self {
219+ value: self . value. trunc( ) ,
220+ }
221+ }
222+
223+ pub fn fract( & self ) -> Self {
224+ Self {
225+ value: self . value. fract( ) ,
226+ }
227+ }
228+
229+ pub fn is_nan( & self ) -> bool {
230+ self . value. is_nan( )
231+ }
232+
233+ pub fn is_infinite( & self ) -> bool {
234+ self . value. is_infinite( )
235+ }
192236 }
193237
194238 qty_ctor!{ @impl_arith_ops $typename}
You can’t perform that action at this time.
0 commit comments