engage/generated/system/
double.rs1#[cfg(feature = "system-double-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/double/Double.md"))]
14 #[repr(C)]
15 #[derive(::core::clone::Clone, ::core::marker::Copy)]
16 pub struct Double {
17 pub m_value: f64,
18 }
19 impl ::unity::ClassIdentity for Double {
20 const NAME: &'static str = "Double";
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 Double {
29 fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
30 &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
31 }
32 }
33 impl Double {
34 #[inline]
35 pub fn min_value() -> f64 {
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: f64) {
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 max_value() -> f64 {
50 static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
51 let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "MaxValue");
52 ::unity::static_field_get_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset)
53 }
54
55 #[inline]
56 pub fn set_max_value(value: f64) {
57 static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
58 let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "MaxValue");
59 ::unity::static_field_set_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset, value);
60 }
61
62 #[inline]
63 pub fn epsilon() -> f64 {
64 static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
65 let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "Epsilon");
66 ::unity::static_field_get_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset)
67 }
68
69 #[inline]
70 pub fn set_epsilon(value: f64) {
71 static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
72 let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "Epsilon");
73 ::unity::static_field_set_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset, value);
74 }
75
76 #[inline]
77 pub fn negative_infinity() -> f64 {
78 static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
79 let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "NegativeInfinity");
80 ::unity::static_field_get_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset)
81 }
82
83 #[inline]
84 pub fn set_negative_infinity(value: f64) {
85 static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
86 let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "NegativeInfinity");
87 ::unity::static_field_set_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset, value);
88 }
89
90 #[inline]
91 pub fn positive_infinity() -> f64 {
92 static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
93 let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "PositiveInfinity");
94 ::unity::static_field_get_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset)
95 }
96
97 #[inline]
98 pub fn set_positive_infinity(value: f64) {
99 static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
100 let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "PositiveInfinity");
101 ::unity::static_field_set_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset, value);
102 }
103
104 #[inline]
105 pub fn na_n() -> f64 {
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: f64) {
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 #[inline]
119 pub fn negative_zero() -> f64 {
120 static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
121 let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "NegativeZero");
122 ::unity::static_field_get_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset)
123 }
124
125 #[inline]
126 pub fn set_negative_zero(value: f64) {
127 static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
128 let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "NegativeZero");
129 ::unity::static_field_set_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset, value);
130 }
131 }
132}
133
134#[cfg(feature = "system-double-types")]
135pub use __types::*;
136
137#[cfg(feature = "system-double")]
138impl Double {
139 #[doc = "`IsInfinity(f64)` overload"]
140 pub fn is_infinity(d: impl ::core::convert::Into<f64>) -> bool {
141 unsafe {
142 ::unity::il2cpp_call!((::unity::module_base()+0x363ec10usize)as*mut u8,bool;
143(f64)::core::convert::Into::into(d))
144 }
145 }
146
147 #[doc = "`IsPositiveInfinity(f64)` overload"]
148 pub fn is_positive_infinity(d: impl ::core::convert::Into<f64>) -> bool {
149 unsafe {
150 ::unity::il2cpp_call!((::unity::module_base()+0x363ec30usize)as*mut u8,bool;
151(f64)::core::convert::Into::into(d))
152 }
153 }
154
155 #[doc = "`IsNegativeInfinity(f64)` overload"]
156 pub fn is_negative_infinity(d: impl ::core::convert::Into<f64>) -> bool {
157 unsafe {
158 ::unity::il2cpp_call!((::unity::module_base()+0x363ec50usize)as*mut u8,bool;
159(f64)::core::convert::Into::into(d))
160 }
161 }
162
163 #[doc = "`IsNegative(f64)` overload"]
164 pub fn is_negative(d: impl ::core::convert::Into<f64>) -> bool {
165 unsafe {
166 ::unity::il2cpp_call!((::unity::module_base()+0x363ec70usize)as*mut u8,bool;
167(f64)::core::convert::Into::into(d))
168 }
169 }
170
171 #[doc = "`IsNaN(f64)` overload"]
172 pub fn is_na_n(d: impl ::core::convert::Into<f64>) -> bool {
173 unsafe {
174 ::unity::il2cpp_call!((::unity::module_base()+0x363ec80usize)as*mut u8,bool;
175(f64)::core::convert::Into::into(d))
176 }
177 }
178
179 #[doc = "`Parse(::unity::Il2CppString)` overload"]
180 pub fn parse(s: impl ::core::convert::Into<::unity::Il2CppString>) -> f64 {
181 unsafe {
182 ::unity::il2cpp_call!((::unity::module_base()+0x363f1f0usize)as*mut u8,f64;
183(::unity::Il2CppString)::core::convert::Into::into(s))
184 }
185 }
186
187 #[doc = "`TryParse(::unity::Il2CppString, *mutf64)` overload"]
188 pub fn try_parse(s: impl ::core::convert::Into<::unity::Il2CppString>) -> (bool, f64) {
189 unsafe {
190 let mut __out_0 = ::core::mem::MaybeUninit::<f64>::uninit();
191 let __ret = {
192 ::unity::il2cpp_call!((::unity::module_base()+0x363f3b0usize)as*mut u8,bool;
193(::unity::Il2CppString)::core::convert::Into::into(s),(*mut f64)__out_0.as_mut_ptr())
194 };
195 (__ret, __out_0.assume_init())
196 }
197 }
198
199 #[doc = "`.cctor()` overload"]
200 pub fn cctor() -> () {
201 unsafe {
202 ::unity::il2cpp_call!((::unity::module_base()+0x363ff00usize)as*mut u8,();
203 )
204 }
205 }
206}
207
208#[cfg(feature = "system-double")]
209impl Double {
210 #[doc = "`CompareTo(crate::system::object::Object)` overload"]
211 pub fn compare_to(&mut self, value: impl ::core::convert::Into<crate::system::object::Object>) -> i32 {
212 unsafe {
213 ::unity::il2cpp_call!((::unity::module_base()+0x363eca0usize)as*mut u8,i32;
214(*mut Double)self as*mut Double,(crate::system::object::Object)::core::convert::Into::into(value))
215 }
216 }
217
218 #[doc = "`CompareTo(f64)` overload"]
219 pub fn compare_to_2(&mut self, value: impl ::core::convert::Into<f64>) -> i32 {
220 unsafe {
221 ::unity::il2cpp_call!((::unity::module_base()+0x363edf0usize)as*mut u8,i32;
222(*mut Double)self as*mut Double,(f64)::core::convert::Into::into(value))
223 }
224 }
225
226 #[doc = "`Equals(crate::system::object::Object)` overload"]
227 pub fn equals(&mut self, obj: impl ::core::convert::Into<crate::system::object::Object>) -> bool {
228 unsafe {
229 ::unity::il2cpp_call!((::unity::module_base()+0x363eef0usize)as*mut u8,bool;
230(*mut Double)self as*mut Double,(crate::system::object::Object)::core::convert::Into::into(obj))
231 }
232 }
233
234 #[doc = "`Equals(f64)` overload"]
235 pub fn equals_2(&mut self, obj: impl ::core::convert::Into<f64>) -> bool {
236 unsafe {
237 ::unity::il2cpp_call!((::unity::module_base()+0x363efe0usize)as*mut u8,bool;
238(*mut Double)self as*mut Double,(f64)::core::convert::Into::into(obj))
239 }
240 }
241
242 #[doc = "`GetHashCode()` overload"]
243 pub fn get_hash_code(&mut self) -> i32 {
244 unsafe {
245 ::unity::il2cpp_call!((::unity::module_base()+0x363f0c0usize)as*mut u8,i32;
246(*mut Double)self as*mut Double)
247 }
248 }
249
250 #[doc = "`ToString()` overload"]
251 pub fn to_string(&mut self) -> ::unity::Il2CppString {
252 unsafe {
253 ::unity::il2cpp_call!((::unity::module_base()+0x363f0e0usize)as*mut u8, ::unity::Il2CppString;
254(*mut Double)self as*mut Double)
255 }
256 }
257
258 #[doc = "`ToString(::unity::Il2CppString)` overload"]
259 pub fn to_string_2(&mut self, format: impl ::core::convert::Into<::unity::Il2CppString>) -> ::unity::Il2CppString {
260 unsafe {
261 ::unity::il2cpp_call!((::unity::module_base()+0x363f120usize)as*mut u8, ::unity::Il2CppString;
262(*mut Double)self as*mut Double,(::unity::Il2CppString)::core::convert::Into::into(format))
263 }
264 }
265}
266
267#[cfg(feature = "system-double")]
268impl Double {
269 pub fn is_infinity_method_info() -> &'static ::unity::il2cpp::MethodInfo {
270 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
271 }
272
273 pub fn is_positive_infinity_method_info() -> &'static ::unity::il2cpp::MethodInfo {
274 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
275 }
276
277 pub fn is_negative_infinity_method_info() -> &'static ::unity::il2cpp::MethodInfo {
278 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
279 }
280
281 pub fn is_negative_method_info() -> &'static ::unity::il2cpp::MethodInfo {
282 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
283 }
284
285 pub fn is_na_n_method_info() -> &'static ::unity::il2cpp::MethodInfo {
286 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
287 }
288
289 pub fn compare_to_method_info() -> &'static ::unity::il2cpp::MethodInfo {
290 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
291 }
292
293 pub fn compare_to_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
294 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
295 }
296
297 pub fn equals_method_info() -> &'static ::unity::il2cpp::MethodInfo {
298 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
299 }
300
301 pub fn equals_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
302 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
303 }
304
305 pub fn get_hash_code_method_info() -> &'static ::unity::il2cpp::MethodInfo {
306 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
307 }
308
309 pub fn to_string_method_info() -> &'static ::unity::il2cpp::MethodInfo {
310 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
311 }
312
313 pub fn to_string_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
314 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
315 }
316
317 pub fn parse_method_info() -> &'static ::unity::il2cpp::MethodInfo {
318 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[14]
319 }
320
321 pub fn try_parse_method_info() -> &'static ::unity::il2cpp::MethodInfo {
322 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[18]
323 }
324
325 pub fn cctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
326 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[37]
327 }
328}
329
330#[cfg(feature = "system-double")]
331#[doc(hidden)]
332pub mod prelude {
333 pub use super::Double;
334 #[cfg(feature = "system-object")]
335 pub use crate::system::object::IObjectMethods;
336 #[cfg(feature = "system-valuetype")]
337 pub use crate::system::valuetype::IValueTypeMethods;
338 pub use crate::system::{object::IObject, valuetype::IValueType};
339}