1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
// <auto-generated>
// This code was generated by the UnitCodeGenerator tool
//
// Changes to this file will be lost if the code is regenerated
// </auto-generated>

//! # Energy based converters

/// Btu conversion functions
pub mod btu {
	/// Converts the supplied Btu value to Kilojoules
	/// # Arguments
	/// * `value` - The Btu input value
	pub fn to_kilojoules(value: f64) -> f64 {
		return value * 1.0550559;
	}
	/// Converts the supplied Btu value to Kilocalories
	/// # Arguments
	/// * `value` - The Btu input value
	pub fn to_kilocalories(value: f64) -> f64 {
		return value * 0.2521644007218;
	}
	/// Converts the supplied Btu value to Joules
	/// # Arguments
	/// * `value` - The Btu input value
	pub fn to_joules(value: f64) -> f64 {
		return value * 1055.06;
	}
	/// Converts the supplied Btu value to Calories
	/// # Arguments
	/// * `value` - The Btu input value
	pub fn to_calories(value: f64) -> f64 {
		return value * 252.1644007218;
	}
	/// Converts the supplied Btu value to US Therms
	/// # Arguments
	/// * `value` - The Btu input value
	pub fn to_u_s_therms(value: f64) -> f64 {
		return value / 99976.12448781215;
	}
	/// Converts the supplied Btu value to Watt Hours
	/// # Arguments
	/// * `value` - The Btu input value
	pub fn to_watt_hours(value: f64) -> f64 {
		return value * 0.293071;
	}
	/// Converts the supplied Btu value to Kilowatt Hours
	/// # Arguments
	/// * `value` - The Btu input value
	pub fn to_kilowatt_hours(value: f64) -> f64 {
		return value / 3412.14;
	}
	/// Converts the supplied Btu value to Foot Pounds
	/// # Arguments
	/// * `value` - The Btu input value
	pub fn to_foot_pounds(value: f64) -> f64 {
		return value * 778.169;
	}
	/// Converts the supplied Btu value to Electronvolts
	/// # Arguments
	/// * `value` - The Btu input value
	pub fn to_electronvolts(value: f64) -> f64 {
		return value * 6585141385224143241216.00;
	}
}
/// Calories conversion functions
pub mod calories {
	/// Converts the supplied Calories value to Kilojoules
	/// # Arguments
	/// * `value` - The Calories input value
	pub fn to_kilojoules(value: f64) -> f64 {
		return value / 239.0057;
	}
	/// Converts the supplied Calories value to Kilocalories
	/// # Arguments
	/// * `value` - The Calories input value
	pub fn to_kilocalories(value: f64) -> f64 {
		return value / 1000.0;
	}
	/// Converts the supplied Calories value to Joules
	/// # Arguments
	/// * `value` - The Calories input value
	pub fn to_joules(value: f64) -> f64 {
		return value * 4.184;
	}
	/// Converts the supplied Calories value to Btu
	/// # Arguments
	/// * `value` - The Calories input value
	pub fn to_btu(value: f64) -> f64 {
		return value / 252.1644007218;
	}
	/// Converts the supplied Calories value to US Therms
	/// # Arguments
	/// * `value` - The Calories input value
	pub fn to_u_s_therms(value: f64) -> f64 {
		return value / 25210420.0;
	}
	/// Converts the supplied Calories value to Watt Hours
	/// # Arguments
	/// * `value` - The Calories input value
	pub fn to_watt_hours(value: f64) -> f64 {
		return value * 0.00116222;
	}
	/// Converts the supplied Calories value to Kilowatt Hours
	/// # Arguments
	/// * `value` - The Calories input value
	pub fn to_kilowatt_hours(value: f64) -> f64 {
		return value / 860421.0;
	}
	/// Converts the supplied Calories value to Foot Pounds
	/// # Arguments
	/// * `value` - The Calories input value
	pub fn to_foot_pounds(value: f64) -> f64 {
		return value * 3.08596;
	}
	/// Converts the supplied Calories value to Electronvolts
	/// # Arguments
	/// * `value` - The Calories input value
	pub fn to_electronvolts(value: f64) -> f64 {
		return value * 2.6131936951817e+19;
	}
}
/// Electronvolts conversion functions
pub mod electronvolts {
	/// Converts the supplied Electronvolts value to Kilojoules
	/// # Arguments
	/// * `value` - The Electronvolts input value
	pub fn to_kilojoules(value: f64) -> f64 {
		return value / 6241509744511500156928.00;
	}
	/// Converts the supplied Electronvolts value to Kilocalories
	/// # Arguments
	/// * `value` - The Electronvolts input value
	pub fn to_kilocalories(value: f64) -> f64 {
		return value / 26131952998320305078272.00;
	}
	/// Converts the supplied Electronvolts value to Joules
	/// # Arguments
	/// * `value` - The Electronvolts input value
	pub fn to_joules(value: f64) -> f64 {
		return value / 6241509343300000000.0;
	}
	/// Converts the supplied Electronvolts value to Btu
	/// # Arguments
	/// * `value` - The Electronvolts input value
	pub fn to_btu(value: f64) -> f64 {
		return value / 6585141385224143241216.0;
	}
	/// Converts the supplied Electronvolts value to Calories
	/// # Arguments
	/// * `value` - The Electronvolts input value
	pub fn to_calories(value: f64) -> f64 {
		return value / 2.6131936951817e+19;
	}
	/// Converts the supplied Electronvolts value to US Therms
	/// # Arguments
	/// * `value` - The Electronvolts input value
	pub fn to_u_s_therms(value: f64) -> f64 {
		return value / 6.5835660010911e+26;
	}
	/// Converts the supplied Electronvolts value to Watt Hours
	/// # Arguments
	/// * `value` - The Electronvolts input value
	pub fn to_watt_hours(value: f64) -> f64 {
		return value / 2.2469422907138e+22;
	}
	/// Converts the supplied Electronvolts value to Kilowatt Hours
	/// # Arguments
	/// * `value` - The Electronvolts input value
	pub fn to_kilowatt_hours(value: f64) -> f64 {
		return value / 2.246943e+25;
	}
	/// Converts the supplied Electronvolts value to Foot Pounds
	/// # Arguments
	/// * `value` - The Electronvolts input value
	pub fn to_foot_pounds(value: f64) -> f64 {
		return value / 8462350936293971968.00;
	}
}
/// Foot Pounds conversion functions
pub mod foot_pounds {
	/// Converts the supplied Foot Pounds value to Kilojoules
	/// # Arguments
	/// * `value` - The Foot Pounds input value
	pub fn to_kilojoules(value: f64) -> f64 {
		return value / 737.562;
	}
	/// Converts the supplied Foot Pounds value to Kilocalories
	/// # Arguments
	/// * `value` - The Foot Pounds input value
	pub fn to_kilocalories(value: f64) -> f64 {
		return value / 3085.96;
	}
	/// Converts the supplied Foot Pounds value to Joules
	/// # Arguments
	/// * `value` - The Foot Pounds input value
	pub fn to_joules(value: f64) -> f64 {
		return value * 1.35582;
	}
	/// Converts the supplied Foot Pounds value to Btu
	/// # Arguments
	/// * `value` - The Foot Pounds input value
	pub fn to_btu(value: f64) -> f64 {
		return value / 778.169;
	}
	/// Converts the supplied Foot Pounds value to Calories
	/// # Arguments
	/// * `value` - The Foot Pounds input value
	pub fn to_calories(value: f64) -> f64 {
		return value / 3.08596;
	}
	/// Converts the supplied Foot Pounds value to US Therms
	/// # Arguments
	/// * `value` - The Foot Pounds input value
	pub fn to_u_s_therms(value: f64) -> f64 {
		return value / 77816937.099186;
	}
	/// Converts the supplied Foot Pounds value to Watt Hours
	/// # Arguments
	/// * `value` - The Foot Pounds input value
	pub fn to_watt_hours(value: f64) -> f64 {
		return value / 2655.22;
	}
	/// Converts the supplied Foot Pounds value to Kilowatt Hours
	/// # Arguments
	/// * `value` - The Foot Pounds input value
	pub fn to_kilowatt_hours(value: f64) -> f64 {
		return value * 0.00000037662;
	}
	/// Converts the supplied Foot Pounds value to Electronvolts
	/// # Arguments
	/// * `value` - The Foot Pounds input value
	pub fn to_electronvolts(value: f64) -> f64 {
		return value * 8462350936293971968.00;
	}
}
/// Joules conversion functions
pub mod joules {
	/// Converts the supplied Joules value to Kilojoules
	/// # Arguments
	/// * `value` - The Joules input value
	pub fn to_kilojoules(value: f64) -> f64 {
		return value / 1000.0;
	}
	/// Converts the supplied Joules value to Kilocalories
	/// # Arguments
	/// * `value` - The Joules input value
	pub fn to_kilocalories(value: f64) -> f64 {
		return value / 4184.0;
	}
	/// Converts the supplied Joules value to Btu
	/// # Arguments
	/// * `value` - The Joules input value
	pub fn to_btu(value: f64) -> f64 {
		return value / 1055.06;
	}
	/// Converts the supplied Joules value to Calories
	/// # Arguments
	/// * `value` - The Joules input value
	pub fn to_calories(value: f64) -> f64 {
		return value / 4.184;
	}
	/// Converts the supplied Joules value to US Therms
	/// # Arguments
	/// * `value` - The Joules input value
	pub fn to_u_s_therms(value: f64) -> f64 {
		return value / 105480400.0;
	}
	/// Converts the supplied Joules value to Watt Hours
	/// # Arguments
	/// * `value` - The Joules input value
	pub fn to_watt_hours(value: f64) -> f64 {
		return value / 3600.0;
	}
	/// Converts the supplied Joules value to Kilowatt Hours
	/// # Arguments
	/// * `value` - The Joules input value
	pub fn to_kilowatt_hours(value: f64) -> f64 {
		return value / 3.6e+6;
	}
	/// Converts the supplied Joules value to Foot Pounds
	/// # Arguments
	/// * `value` - The Joules input value
	pub fn to_foot_pounds(value: f64) -> f64 {
		return value / 1.35582;
	}
	/// Converts the supplied Joules value to Electronvolts
	/// # Arguments
	/// * `value` - The Joules input value
	pub fn to_electronvolts(value: f64) -> f64 {
		return value * 6241509343300000000.0;
	}
}
/// Kilocalories conversion functions
pub mod kilocalories {
	/// Converts the supplied Kilocalories value to Kilojoules
	/// # Arguments
	/// * `value` - The Kilocalories input value
	pub fn to_kilojoules(value: f64) -> f64 {
		return value * 4.184;
	}
	/// Converts the supplied Kilocalories value to Joules
	/// # Arguments
	/// * `value` - The Kilocalories input value
	pub fn to_joules(value: f64) -> f64 {
		return value * 4184.0;
	}
	/// Converts the supplied Kilocalories value to Btu
	/// # Arguments
	/// * `value` - The Kilocalories input value
	pub fn to_btu(value: f64) -> f64 {
		return value / 0.2521644007218;
	}
	/// Converts the supplied Kilocalories value to Calories
	/// # Arguments
	/// * `value` - The Kilocalories input value
	pub fn to_calories(value: f64) -> f64 {
		return value * 1000.0;
	}
	/// Converts the supplied Kilocalories value to US Therms
	/// # Arguments
	/// * `value` - The Kilocalories input value
	pub fn to_u_s_therms(value: f64) -> f64 {
		return value / 25210.44007218;
	}
	/// Converts the supplied Kilocalories value to Watt Hours
	/// # Arguments
	/// * `value` - The Kilocalories input value
	pub fn to_watt_hours(value: f64) -> f64 {
		return value * 1.16222;
	}
	/// Converts the supplied Kilocalories value to Kilowatt Hours
	/// # Arguments
	/// * `value` - The Kilocalories input value
	pub fn to_kilowatt_hours(value: f64) -> f64 {
		return value / 860.421;
	}
	/// Converts the supplied Kilocalories value to Foot Pounds
	/// # Arguments
	/// * `value` - The Kilocalories input value
	pub fn to_foot_pounds(value: f64) -> f64 {
		return value * 3085.96;
	}
	/// Converts the supplied Kilocalories value to Electronvolts
	/// # Arguments
	/// * `value` - The Kilocalories input value
	pub fn to_electronvolts(value: f64) -> f64 {
		return value * 26131952998320305078272.00;
	}
}
/// Kilojoules conversion functions
pub mod kilojoules {
	/// Converts the supplied Kilojoules value to Kilocalories
	/// # Arguments
	/// * `value` - The Kilojoules input value
	pub fn to_kilocalories(value: f64) -> f64 {
		return value / 4.184;
	}
	/// Converts the supplied Kilojoules value to Joules
	/// # Arguments
	/// * `value` - The Kilojoules input value
	pub fn to_joules(value: f64) -> f64 {
		return value * 1000.0;
	}
	/// Converts the supplied Kilojoules value to Btu
	/// # Arguments
	/// * `value` - The Kilojoules input value
	pub fn to_btu(value: f64) -> f64 {
		return value / 1.0550559;
	}
	/// Converts the supplied Kilojoules value to Calories
	/// # Arguments
	/// * `value` - The Kilojoules input value
	pub fn to_calories(value: f64) -> f64 {
		return value * 239.0057;
	}
	/// Converts the supplied Kilojoules value to US Therms
	/// # Arguments
	/// * `value` - The Kilojoules input value
	pub fn to_u_s_therms(value: f64) -> f64 {
		return value / 105480.04;
	}
	/// Converts the supplied Kilojoules value to Watt Hours
	/// # Arguments
	/// * `value` - The Kilojoules input value
	pub fn to_watt_hours(value: f64) -> f64 {
		return value / 3.6;
	}
	/// Converts the supplied Kilojoules value to Kilowatt Hours
	/// # Arguments
	/// * `value` - The Kilojoules input value
	pub fn to_kilowatt_hours(value: f64) -> f64 {
		return value / 3600.0;
	}
	/// Converts the supplied Kilojoules value to Foot Pounds
	/// # Arguments
	/// * `value` - The Kilojoules input value
	pub fn to_foot_pounds(value: f64) -> f64 {
		return value * 737.562;
	}
	/// Converts the supplied Kilojoules value to Electronvolts
	/// # Arguments
	/// * `value` - The Kilojoules input value
	pub fn to_electronvolts(value: f64) -> f64 {
		return value * 6241509744511500156928.00;
	}
}
/// Kilowatt Hours conversion functions
pub mod kilowatt_hours {
	/// Converts the supplied Kilowatt Hours value to Kilojoules
	/// # Arguments
	/// * `value` - The Kilowatt Hours input value
	pub fn to_kilojoules(value: f64) -> f64 {
		return value * 3600.0;
	}
	/// Converts the supplied Kilowatt Hours value to Kilocalories
	/// # Arguments
	/// * `value` - The Kilowatt Hours input value
	pub fn to_kilocalories(value: f64) -> f64 {
		return value * 860.421;
	}
	/// Converts the supplied Kilowatt Hours value to Joules
	/// # Arguments
	/// * `value` - The Kilowatt Hours input value
	pub fn to_joules(value: f64) -> f64 {
		return value * 3.6e+6;
	}
	/// Converts the supplied Kilowatt Hours value to Btu
	/// # Arguments
	/// * `value` - The Kilowatt Hours input value
	pub fn to_btu(value: f64) -> f64 {
		return value * 3412.14;
	}
	/// Converts the supplied Kilowatt Hours value to Calories
	/// # Arguments
	/// * `value` - The Kilowatt Hours input value
	pub fn to_calories(value: f64) -> f64 {
		return value * 860421.0;
	}
	/// Converts the supplied Kilowatt Hours value to US Therms
	/// # Arguments
	/// * `value` - The Kilowatt Hours input value
	pub fn to_u_s_therms(value: f64) -> f64 {
		return value / 29.3001;
	}
	/// Converts the supplied Kilowatt Hours value to Watt Hours
	/// # Arguments
	/// * `value` - The Kilowatt Hours input value
	pub fn to_watt_hours(value: f64) -> f64 {
		return value * 1000.0;
	}
	/// Converts the supplied Kilowatt Hours value to Foot Pounds
	/// # Arguments
	/// * `value` - The Kilowatt Hours input value
	pub fn to_foot_pounds(value: f64) -> f64 {
		return value / 0.00000037662;
	}
	/// Converts the supplied Kilowatt Hours value to Electronvolts
	/// # Arguments
	/// * `value` - The Kilowatt Hours input value
	pub fn to_electronvolts(value: f64) -> f64 {
		return value * 2.246943e+25;
	}
}
/// US Therms conversion functions
pub mod u_s_therms {
	/// Converts the supplied US Therms value to Kilojoules
	/// # Arguments
	/// * `value` - The US Therms input value
	pub fn to_kilojoules(value: f64) -> f64 {
		return value * 105480.04;
	}
	/// Converts the supplied US Therms value to Kilocalories
	/// # Arguments
	/// * `value` - The US Therms input value
	pub fn to_kilocalories(value: f64) -> f64 {
		return value * 25210.44007218;
	}
	/// Converts the supplied US Therms value to Joules
	/// # Arguments
	/// * `value` - The US Therms input value
	pub fn to_joules(value: f64) -> f64 {
		return value * 105480400.0;
	}
	/// Converts the supplied US Therms value to Btu
	/// # Arguments
	/// * `value` - The US Therms input value
	pub fn to_btu(value: f64) -> f64 {
		return value * 99976.12448781215;
	}
	/// Converts the supplied US Therms value to Calories
	/// # Arguments
	/// * `value` - The US Therms input value
	pub fn to_calories(value: f64) -> f64 {
		return value * 25210420.0;
	}
	/// Converts the supplied US Therms value to Watt Hours
	/// # Arguments
	/// * `value` - The US Therms input value
	pub fn to_watt_hours(value: f64) -> f64 {
		return value * 29300.1;
	}
	/// Converts the supplied US Therms value to Kilowatt Hours
	/// # Arguments
	/// * `value` - The US Therms input value
	pub fn to_kilowatt_hours(value: f64) -> f64 {
		return value * 29.3001;
	}
	/// Converts the supplied US Therms value to Foot Pounds
	/// # Arguments
	/// * `value` - The US Therms input value
	pub fn to_foot_pounds(value: f64) -> f64 {
		return value * 77816937.099186;
	}
	/// Converts the supplied US Therms value to Electronvolts
	/// # Arguments
	/// * `value` - The US Therms input value
	pub fn to_electronvolts(value: f64) -> f64 {
		return value * 6.5835660010911e+26;
	}
}
/// Watt Hours conversion functions
pub mod watt_hours {
	/// Converts the supplied Watt Hours value to Kilojoules
	/// # Arguments
	/// * `value` - The Watt Hours input value
	pub fn to_kilojoules(value: f64) -> f64 {
		return value * 3.6;
	}
	/// Converts the supplied Watt Hours value to Kilocalories
	/// # Arguments
	/// * `value` - The Watt Hours input value
	pub fn to_kilocalories(value: f64) -> f64 {
		return value / 1.16222;
	}
	/// Converts the supplied Watt Hours value to Joules
	/// # Arguments
	/// * `value` - The Watt Hours input value
	pub fn to_joules(value: f64) -> f64 {
		return value * 3600.0;
	}
	/// Converts the supplied Watt Hours value to Btu
	/// # Arguments
	/// * `value` - The Watt Hours input value
	pub fn to_btu(value: f64) -> f64 {
		return value / 0.293071;
	}
	/// Converts the supplied Watt Hours value to Calories
	/// # Arguments
	/// * `value` - The Watt Hours input value
	pub fn to_calories(value: f64) -> f64 {
		return value / 0.00116222;
	}
	/// Converts the supplied Watt Hours value to US Therms
	/// # Arguments
	/// * `value` - The Watt Hours input value
	pub fn to_u_s_therms(value: f64) -> f64 {
		return value / 29300.1;
	}
	/// Converts the supplied Watt Hours value to Kilowatt Hours
	/// # Arguments
	/// * `value` - The Watt Hours input value
	pub fn to_kilowatt_hours(value: f64) -> f64 {
		return value / 1000.0;
	}
	/// Converts the supplied Watt Hours value to Foot Pounds
	/// # Arguments
	/// * `value` - The Watt Hours input value
	pub fn to_foot_pounds(value: f64) -> f64 {
		return value * 2655.22;
	}
	/// Converts the supplied Watt Hours value to Electronvolts
	/// # Arguments
	/// * `value` - The Watt Hours input value
	pub fn to_electronvolts(value: f64) -> f64 {
		return value * 2.2469422907138e+22;
	}
}