Skip to main content

engage/generated/system/
single.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "system-single-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::system::{
9        object::{IObject, Object},
10        valuetype::{IValueType, ValueType},
11    };
12
13    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/system/single/Single.md"))]
14    #[repr(C)]
15    #[derive(::core::clone::Clone, ::core::marker::Copy)]
16    pub struct Single {
17        pub m_value: f32,
18    }
19    impl ::unity::ClassIdentity for Single {
20        const NAME: &'static str = "Single";
21        const NAMESPACE: &'static str = "System";
22
23        fn class() -> ::unity::Class {
24            static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
25            *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
26        }
27    }
28    impl ::unity::IlType for Single {
29        fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
30            &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
31        }
32    }
33    impl Single {
34        #[inline]
35        pub fn min_value() -> f32 {
36            static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
37            let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "MinValue");
38            ::unity::static_field_get_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset)
39        }
40
41        #[inline]
42        pub fn set_min_value(value: f32) {
43            static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
44            let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "MinValue");
45            ::unity::static_field_set_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset, value);
46        }
47
48        #[inline]
49        pub fn epsilon() -> f32 {
50            static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
51            let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "Epsilon");
52            ::unity::static_field_get_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset)
53        }
54
55        #[inline]
56        pub fn set_epsilon(value: f32) {
57            static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
58            let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "Epsilon");
59            ::unity::static_field_set_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset, value);
60        }
61
62        #[inline]
63        pub fn max_value() -> f32 {
64            static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
65            let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "MaxValue");
66            ::unity::static_field_get_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset)
67        }
68
69        #[inline]
70        pub fn set_max_value(value: f32) {
71            static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
72            let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "MaxValue");
73            ::unity::static_field_set_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset, value);
74        }
75
76        #[inline]
77        pub fn positive_infinity() -> f32 {
78            static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
79            let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "PositiveInfinity");
80            ::unity::static_field_get_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset)
81        }
82
83        #[inline]
84        pub fn set_positive_infinity(value: f32) {
85            static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
86            let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "PositiveInfinity");
87            ::unity::static_field_set_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset, value);
88        }
89
90        #[inline]
91        pub fn negative_infinity() -> f32 {
92            static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
93            let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "NegativeInfinity");
94            ::unity::static_field_get_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset)
95        }
96
97        #[inline]
98        pub fn set_negative_infinity(value: f32) {
99            static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
100            let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "NegativeInfinity");
101            ::unity::static_field_set_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset, value);
102        }
103
104        #[inline]
105        pub fn na_n() -> f32 {
106            static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
107            let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "NaN");
108            ::unity::static_field_get_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset)
109        }
110
111        #[inline]
112        pub fn set_na_n(value: f32) {
113            static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
114            let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "NaN");
115            ::unity::static_field_set_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset, value);
116        }
117    }
118}
119
120#[cfg(feature = "system-single-types")]
121pub use __types::*;
122
123#[cfg(feature = "system-single")]
124impl Single {
125    #[doc = "`IsInfinity(f32)` overload"]
126    pub fn is_infinity(f: impl ::core::convert::Into<f32>) -> bool {
127        unsafe {
128            ::unity::il2cpp_call!((::unity::module_base()+0x376cf90usize)as*mut u8,bool;
129(f32)::core::convert::Into::into(f))
130        }
131    }
132
133    #[doc = "`IsPositiveInfinity(f32)` overload"]
134    pub fn is_positive_infinity(f: impl ::core::convert::Into<f32>) -> bool {
135        unsafe {
136            ::unity::il2cpp_call!((::unity::module_base()+0x376cfb0usize)as*mut u8,bool;
137(f32)::core::convert::Into::into(f))
138        }
139    }
140
141    #[doc = "`IsNegativeInfinity(f32)` overload"]
142    pub fn is_negative_infinity(f: impl ::core::convert::Into<f32>) -> bool {
143        unsafe {
144            ::unity::il2cpp_call!((::unity::module_base()+0x376cfd0usize)as*mut u8,bool;
145(f32)::core::convert::Into::into(f))
146        }
147    }
148
149    #[doc = "`IsNaN(f32)` overload"]
150    pub fn is_na_n(f: impl ::core::convert::Into<f32>) -> bool {
151        unsafe {
152            ::unity::il2cpp_call!((::unity::module_base()+0x376cfe0usize)as*mut u8,bool;
153(f32)::core::convert::Into::into(f))
154        }
155    }
156
157    #[doc = "`Parse(::unity::Il2CppString)` overload"]
158    pub fn parse(s: impl ::core::convert::Into<::unity::Il2CppString>) -> f32 {
159        unsafe {
160            ::unity::il2cpp_call!((::unity::module_base()+0x376d3f0usize)as*mut u8,f32;
161(::unity::Il2CppString)::core::convert::Into::into(s))
162        }
163    }
164
165    #[doc = "`TryParse(::unity::Il2CppString, *mutf32)` overload"]
166    pub fn try_parse(s: impl ::core::convert::Into<::unity::Il2CppString>) -> (bool, f32) {
167        unsafe {
168            let mut __out_0 = ::core::mem::MaybeUninit::<f32>::uninit();
169            let __ret = {
170                ::unity::il2cpp_call!((::unity::module_base()+0x376d4e0usize)as*mut u8,bool;
171(::unity::Il2CppString)::core::convert::Into::into(s),(*mut f32)__out_0.as_mut_ptr())
172            };
173            (__ret, __out_0.assume_init())
174        }
175    }
176}
177
178#[cfg(feature = "system-single")]
179impl Single {
180    #[doc = "`CompareTo(crate::system::object::Object)` overload"]
181    pub fn compare_to(&mut self, value: impl ::core::convert::Into<crate::system::object::Object>) -> i32 {
182        unsafe {
183            ::unity::il2cpp_call!((::unity::module_base()+0x376d000usize)as*mut u8,i32;
184(*mut Single)self as*mut Single,(crate::system::object::Object)::core::convert::Into::into(value))
185        }
186    }
187
188    #[doc = "`CompareTo(f32)` overload"]
189    pub fn compare_to_2(&mut self, value: impl ::core::convert::Into<f32>) -> i32 {
190        unsafe {
191            ::unity::il2cpp_call!((::unity::module_base()+0x376d140usize)as*mut u8,i32;
192(*mut Single)self as*mut Single,(f32)::core::convert::Into::into(value))
193        }
194    }
195
196    #[doc = "`Equals(crate::system::object::Object)` overload"]
197    pub fn equals(&mut self, obj: impl ::core::convert::Into<crate::system::object::Object>) -> bool {
198        unsafe {
199            ::unity::il2cpp_call!((::unity::module_base()+0x376d1a0usize)as*mut u8,bool;
200(*mut Single)self as*mut Single,(crate::system::object::Object)::core::convert::Into::into(obj))
201        }
202    }
203
204    #[doc = "`Equals(f32)` overload"]
205    pub fn equals_2(&mut self, obj: impl ::core::convert::Into<f32>) -> bool {
206        unsafe {
207            ::unity::il2cpp_call!((::unity::module_base()+0x376d270usize)as*mut u8,bool;
208(*mut Single)self as*mut Single,(f32)::core::convert::Into::into(obj))
209        }
210    }
211
212    #[doc = "`GetHashCode()` overload"]
213    pub fn get_hash_code(&mut self) -> i32 {
214        unsafe {
215            ::unity::il2cpp_call!((::unity::module_base()+0x376d2c0usize)as*mut u8,i32;
216(*mut Single)self as*mut Single)
217        }
218    }
219
220    #[doc = "`ToString()` overload"]
221    pub fn to_string(&mut self) -> ::unity::Il2CppString {
222        unsafe {
223            ::unity::il2cpp_call!((::unity::module_base()+0x376d2e0usize)as*mut u8, ::unity::Il2CppString;
224(*mut Single)self as*mut Single)
225        }
226    }
227
228    #[doc = "`ToString(::unity::Il2CppString)` overload"]
229    pub fn to_string_2(&mut self, format: impl ::core::convert::Into<::unity::Il2CppString>) -> ::unity::Il2CppString {
230        unsafe {
231            ::unity::il2cpp_call!((::unity::module_base()+0x376d360usize)as*mut u8, ::unity::Il2CppString;
232(*mut Single)self as*mut Single,(::unity::Il2CppString)::core::convert::Into::into(format))
233        }
234    }
235}
236
237#[cfg(feature = "system-single")]
238impl Single {
239    pub fn is_infinity_method_info() -> &'static ::unity::il2cpp::MethodInfo {
240        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
241    }
242
243    pub fn is_positive_infinity_method_info() -> &'static ::unity::il2cpp::MethodInfo {
244        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
245    }
246
247    pub fn is_negative_infinity_method_info() -> &'static ::unity::il2cpp::MethodInfo {
248        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
249    }
250
251    pub fn is_na_n_method_info() -> &'static ::unity::il2cpp::MethodInfo {
252        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
253    }
254
255    pub fn compare_to_method_info() -> &'static ::unity::il2cpp::MethodInfo {
256        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
257    }
258
259    pub fn compare_to_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
260        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
261    }
262
263    pub fn equals_method_info() -> &'static ::unity::il2cpp::MethodInfo {
264        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
265    }
266
267    pub fn equals_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
268        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
269    }
270
271    pub fn get_hash_code_method_info() -> &'static ::unity::il2cpp::MethodInfo {
272        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
273    }
274
275    pub fn to_string_method_info() -> &'static ::unity::il2cpp::MethodInfo {
276        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
277    }
278
279    pub fn to_string_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
280        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
281    }
282
283    pub fn parse_method_info() -> &'static ::unity::il2cpp::MethodInfo {
284        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[13]
285    }
286
287    pub fn try_parse_method_info() -> &'static ::unity::il2cpp::MethodInfo {
288        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[17]
289    }
290}
291
292#[cfg(feature = "system-single")]
293#[doc(hidden)]
294pub mod prelude {
295    pub use super::Single;
296    #[cfg(feature = "system-object")]
297    pub use crate::system::object::IObjectMethods;
298    #[cfg(feature = "system-valuetype")]
299    pub use crate::system::valuetype::IValueTypeMethods;
300    pub use crate::system::{object::IObject, valuetype::IValueType};
301}