File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed
src/Synercoding.Primitives Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ namespace Synercoding . Primitives
2
+ {
3
+ /// <summary>
4
+ /// Class that can be used as a static using to have quick & easy access to values
5
+ /// </summary>
6
+ /// <example>
7
+ /// using static Synercoding.Primitives.ValueCreator;
8
+ /// </example>
9
+ public static class ValueCreator
10
+ {
11
+ /// <summary>
12
+ /// Create a new <see cref="Value"/> with <see cref="Unit"/> <see cref="Unit.Millimeters"/>
13
+ /// </summary>
14
+ /// <param name="mm">The amount of mm</param>
15
+ /// <returns>A new <see cref="Value"/> object.</returns>
16
+ public static Value Mm ( double mm ) => new Value ( mm , Unit . Millimeters ) ;
17
+ /// <summary>
18
+ /// Create a new <see cref="Value"/> with <see cref="Unit"/> <see cref="Unit.Centimeters"/>
19
+ /// </summary>
20
+ /// <param name="cm">The amount of cm</param>
21
+ /// <returns>A new <see cref="Value"/> object.</returns>
22
+ public static Value Cm ( double cm ) => new Value ( cm , Unit . Centimeters ) ;
23
+ /// <summary>
24
+ /// Create a new <see cref="Value"/> with <see cref="Unit"/> <see cref="Unit.Inches"/>
25
+ /// </summary>
26
+ /// <param name="inch">The amount of inch</param>
27
+ /// <returns>A new <see cref="Value"/> object.</returns>
28
+ public static Value Inch ( double inch ) => new Value ( inch , Unit . Inches ) ;
29
+ /// <summary>
30
+ /// Create a new <see cref="Value"/> with <see cref="Unit"/> <see cref="Unit.Points"/>
31
+ /// </summary>
32
+ /// <param name="pts">The amount of pts</param>
33
+ /// <returns>A new <see cref="Value"/> object.</returns>
34
+ public static Value Pts ( double pts ) => new Value ( pts , Unit . Points ) ;
35
+ }
36
+ }
You can’t perform that action at this time.
0 commit comments