-
Notifications
You must be signed in to change notification settings - Fork 411
Expand file tree
/
Copy pathNumberToRotationalAccelerationExtensions.g.cs
More file actions
80 lines (71 loc) · 3.2 KB
/
NumberToRotationalAccelerationExtensions.g.cs
File metadata and controls
80 lines (71 loc) · 3.2 KB
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
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by \generate-code.bat.
//
// Changes to this file will be lost when the code is regenerated.
// The build server regenerates the code before each build and a pre-build
// step will regenerate the code on each local build.
//
// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
//
// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
//
// </auto-generated>
//------------------------------------------------------------------------------
// Licensed under MIT No Attribution, see LICENSE file at the root.
// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
using System;
#if NET7_0_OR_GREATER
using System.Numerics;
#endif
#nullable enable
namespace UnitsNet.NumberExtensions.NumberToRotationalAcceleration
{
/// <summary>
/// A number to RotationalAcceleration Extensions
/// </summary>
public static class NumberToRotationalAccelerationExtensions
{
/// <inheritdoc cref="RotationalAcceleration.FromDegreesPerSecondSquared(double)" />
public static RotationalAcceleration DegreesPerSecondSquared<T>(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber<T>
=> RotationalAcceleration.FromDegreesPerSecondSquared(double.CreateChecked(value));
#else
, IConvertible
=> RotationalAcceleration.FromDegreesPerSecondSquared(value.ToDouble(null));
#endif
/// <inheritdoc cref="RotationalAcceleration.FromRadiansPerSecondSquared(double)" />
public static RotationalAcceleration RadiansPerSecondSquared<T>(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber<T>
=> RotationalAcceleration.FromRadiansPerSecondSquared(double.CreateChecked(value));
#else
, IConvertible
=> RotationalAcceleration.FromRadiansPerSecondSquared(value.ToDouble(null));
#endif
/// <inheritdoc cref="RotationalAcceleration.FromRevolutionsPerMinutePerSecond(double)" />
public static RotationalAcceleration RevolutionsPerMinutePerSecond<T>(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber<T>
=> RotationalAcceleration.FromRevolutionsPerMinutePerSecond(double.CreateChecked(value));
#else
, IConvertible
=> RotationalAcceleration.FromRevolutionsPerMinutePerSecond(value.ToDouble(null));
#endif
/// <inheritdoc cref="RotationalAcceleration.FromRevolutionsPerSecondSquared(double)" />
public static RotationalAcceleration RevolutionsPerSecondSquared<T>(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber<T>
=> RotationalAcceleration.FromRevolutionsPerSecondSquared(double.CreateChecked(value));
#else
, IConvertible
=> RotationalAcceleration.FromRevolutionsPerSecondSquared(value.ToDouble(null));
#endif
}
}