sketchup-api-stubs 0.7.9 → 0.7.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. checksums.yaml +4 -4
  2. data/lib/sketchup-api-stubs/sketchup.rb +157 -151
  3. data/lib/sketchup-api-stubs/stubs/Array.rb +741 -741
  4. data/lib/sketchup-api-stubs/stubs/Geom/BoundingBox.rb +322 -322
  5. data/lib/sketchup-api-stubs/stubs/Geom/Bounds2d.rb +182 -172
  6. data/lib/sketchup-api-stubs/stubs/Geom/LatLong.rb +111 -126
  7. data/lib/sketchup-api-stubs/stubs/Geom/OrientedBounds2d.rb +102 -102
  8. data/lib/sketchup-api-stubs/stubs/Geom/Point2d.rb +423 -400
  9. data/lib/sketchup-api-stubs/stubs/Geom/Point3d.rb +693 -661
  10. data/lib/sketchup-api-stubs/stubs/Geom/PolygonMesh.rb +535 -509
  11. data/lib/sketchup-api-stubs/stubs/Geom/Transformation.rb +500 -476
  12. data/lib/sketchup-api-stubs/stubs/Geom/Transformation2d.rb +267 -263
  13. data/lib/sketchup-api-stubs/stubs/Geom/UTM.rb +133 -141
  14. data/lib/sketchup-api-stubs/stubs/Geom/Vector2d.rb +547 -522
  15. data/lib/sketchup-api-stubs/stubs/Geom/Vector3d.rb +678 -693
  16. data/lib/sketchup-api-stubs/stubs/Geom.rb +351 -351
  17. data/lib/sketchup-api-stubs/stubs/LanguageHandler.rb +93 -93
  18. data/lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb +595 -595
  19. data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinition.rb +751 -747
  20. data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinitions.rb +183 -183
  21. data/lib/sketchup-api-stubs/stubs/Layout/ConnectionPoint.rb +70 -70
  22. data/lib/sketchup-api-stubs/stubs/Layout/Dictionary.rb +234 -0
  23. data/lib/sketchup-api-stubs/stubs/Layout/Document.rb +683 -517
  24. data/lib/sketchup-api-stubs/stubs/Layout/Ellipse.rb +29 -29
  25. data/lib/sketchup-api-stubs/stubs/Layout/Entities.rb +148 -148
  26. data/lib/sketchup-api-stubs/stubs/Layout/Entity.rb +464 -353
  27. data/lib/sketchup-api-stubs/stubs/Layout/FormattedText.rb +354 -354
  28. data/lib/sketchup-api-stubs/stubs/Layout/Grid.rb +311 -311
  29. data/lib/sketchup-api-stubs/stubs/Layout/Group.rb +261 -261
  30. data/lib/sketchup-api-stubs/stubs/Layout/Image.rb +91 -91
  31. data/lib/sketchup-api-stubs/stubs/Layout/Label.rb +370 -370
  32. data/lib/sketchup-api-stubs/stubs/Layout/Layer.rb +218 -218
  33. data/lib/sketchup-api-stubs/stubs/Layout/LayerInstance.rb +128 -128
  34. data/lib/sketchup-api-stubs/stubs/Layout/Layers.rb +225 -225
  35. data/lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb +614 -567
  36. data/lib/sketchup-api-stubs/stubs/Layout/LockedEntityError.rb +10 -10
  37. data/lib/sketchup-api-stubs/stubs/Layout/LockedLayerError.rb +11 -11
  38. data/lib/sketchup-api-stubs/stubs/Layout/Page.rb +282 -183
  39. data/lib/sketchup-api-stubs/stubs/Layout/PageInfo.rb +458 -387
  40. data/lib/sketchup-api-stubs/stubs/Layout/Pages.rb +209 -209
  41. data/lib/sketchup-api-stubs/stubs/Layout/Path.rb +346 -344
  42. data/lib/sketchup-api-stubs/stubs/Layout/Rectangle.rb +174 -174
  43. data/lib/sketchup-api-stubs/stubs/Layout/ReferenceEntity.rb +82 -82
  44. data/lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb +714 -692
  45. data/lib/sketchup-api-stubs/stubs/Layout/Style.rb +1565 -1519
  46. data/lib/sketchup-api-stubs/stubs/Layout/Table.rb +290 -290
  47. data/lib/sketchup-api-stubs/stubs/Layout/TableCell.rb +149 -149
  48. data/lib/sketchup-api-stubs/stubs/Layout/TableColumn.rb +139 -139
  49. data/lib/sketchup-api-stubs/stubs/Layout/TableRow.rb +135 -135
  50. data/lib/sketchup-api-stubs/stubs/Layout.rb +25 -25
  51. data/lib/sketchup-api-stubs/stubs/Length.rb +286 -278
  52. data/lib/sketchup-api-stubs/stubs/Numeric.rb +249 -249
  53. data/lib/sketchup-api-stubs/stubs/Sketchup/Animation.rb +196 -144
  54. data/lib/sketchup-api-stubs/stubs/Sketchup/AppObserver.rb +169 -169
  55. data/lib/sketchup-api-stubs/stubs/Sketchup/ArcCurve.rb +226 -209
  56. data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionaries.rb +145 -150
  57. data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionary.rb +294 -281
  58. data/lib/sketchup-api-stubs/stubs/Sketchup/Axes.rb +149 -149
  59. data/lib/sketchup-api-stubs/stubs/Sketchup/Behavior.rb +296 -302
  60. data/lib/sketchup-api-stubs/stubs/Sketchup/Camera.rb +473 -478
  61. data/lib/sketchup-api-stubs/stubs/Sketchup/ClassificationSchema.rb +63 -63
  62. data/lib/sketchup-api-stubs/stubs/Sketchup/Classifications.rb +121 -121
  63. data/lib/sketchup-api-stubs/stubs/Sketchup/Color.rb +294 -294
  64. data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentDefinition.rb +673 -659
  65. data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentInstance.rb +600 -593
  66. data/lib/sketchup-api-stubs/stubs/Sketchup/Console.rb +76 -76
  67. data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionLine.rb +252 -257
  68. data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionPoint.rb +32 -32
  69. data/lib/sketchup-api-stubs/stubs/Sketchup/Curve.rb +201 -201
  70. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionList.rb +443 -449
  71. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionObserver.rb +74 -74
  72. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionsObserver.rb +104 -104
  73. data/lib/sketchup-api-stubs/stubs/Sketchup/Dimension.rb +167 -165
  74. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionLinear.rb +306 -306
  75. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionObserver.rb +42 -42
  76. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionRadial.rb +87 -87
  77. data/lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb +403 -406
  78. data/lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb +397 -397
  79. data/lib/sketchup-api-stubs/stubs/Sketchup/EdgeUse.rb +211 -211
  80. data/lib/sketchup-api-stubs/stubs/Sketchup/Entities.rb +1282 -1239
  81. data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesBuilder.rb +261 -261
  82. data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesObserver.rb +127 -127
  83. data/lib/sketchup-api-stubs/stubs/Sketchup/Entity.rb +519 -545
  84. data/lib/sketchup-api-stubs/stubs/Sketchup/EntityObserver.rb +60 -60
  85. data/lib/sketchup-api-stubs/stubs/Sketchup/Environment.rb +406 -0
  86. data/lib/sketchup-api-stubs/stubs/Sketchup/Environments.rb +185 -0
  87. data/lib/sketchup-api-stubs/stubs/Sketchup/EnvironmentsObserver.rb +113 -0
  88. data/lib/sketchup-api-stubs/stubs/Sketchup/ExtensionsManager.rb +122 -125
  89. data/lib/sketchup-api-stubs/stubs/Sketchup/Face.rb +1006 -937
  90. data/lib/sketchup-api-stubs/stubs/Sketchup/FrameChangeObserver.rb +102 -102
  91. data/lib/sketchup-api-stubs/stubs/Sketchup/Group.rb +740 -750
  92. data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Request.rb +289 -282
  93. data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Response.rb +64 -62
  94. data/lib/sketchup-api-stubs/stubs/Sketchup/Http.rb +27 -27
  95. data/lib/sketchup-api-stubs/stubs/Sketchup/Image.rb +405 -468
  96. data/lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb +266 -266
  97. data/lib/sketchup-api-stubs/stubs/Sketchup/Importer.rb +189 -189
  98. data/lib/sketchup-api-stubs/stubs/Sketchup/InputPoint.rb +432 -406
  99. data/lib/sketchup-api-stubs/stubs/Sketchup/InstanceObserver.rb +84 -84
  100. data/lib/sketchup-api-stubs/stubs/Sketchup/InstancePath.rb +307 -306
  101. data/lib/sketchup-api-stubs/stubs/Sketchup/Layer.rb +332 -326
  102. data/lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb +380 -422
  103. data/lib/sketchup-api-stubs/stubs/Sketchup/Layers.rb +409 -427
  104. data/lib/sketchup-api-stubs/stubs/Sketchup/LayersObserver.rb +241 -249
  105. data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing/ExtensionLicense.rb +86 -86
  106. data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing.rb +55 -48
  107. data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyle.rb +24 -24
  108. data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyles.rb +114 -114
  109. data/lib/sketchup-api-stubs/stubs/Sketchup/LoadHandler.rb +70 -0
  110. data/lib/sketchup-api-stubs/stubs/Sketchup/Loop.rb +137 -137
  111. data/lib/sketchup-api-stubs/stubs/Sketchup/Material.rb +1115 -414
  112. data/lib/sketchup-api-stubs/stubs/Sketchup/Materials.rb +330 -317
  113. data/lib/sketchup-api-stubs/stubs/Sketchup/MaterialsObserver.rb +142 -142
  114. data/lib/sketchup-api-stubs/stubs/Sketchup/Menu.rb +93 -93
  115. data/lib/sketchup-api-stubs/stubs/Sketchup/Model.rb +1714 -1652
  116. data/lib/sketchup-api-stubs/stubs/Sketchup/ModelObserver.rb +372 -357
  117. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsManager.rb +133 -130
  118. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb +271 -271
  119. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProviderObserver.rb +58 -58
  120. data/lib/sketchup-api-stubs/stubs/Sketchup/Overlay.rb +463 -490
  121. data/lib/sketchup-api-stubs/stubs/Sketchup/OverlaysManager.rb +104 -116
  122. data/lib/sketchup-api-stubs/stubs/Sketchup/Page.rb +939 -797
  123. data/lib/sketchup-api-stubs/stubs/Sketchup/Pages.rb +388 -361
  124. data/lib/sketchup-api-stubs/stubs/Sketchup/PagesObserver.rb +77 -77
  125. data/lib/sketchup-api-stubs/stubs/Sketchup/PickHelper.rb +501 -478
  126. data/lib/sketchup-api-stubs/stubs/Sketchup/RegionalSettings.rb +43 -43
  127. data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb +385 -361
  128. data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptionsObserver.rb +45 -45
  129. data/lib/sketchup-api-stubs/stubs/Sketchup/SectionPlane.rb +150 -150
  130. data/lib/sketchup-api-stubs/stubs/Sketchup/Selection.rb +451 -458
  131. data/lib/sketchup-api-stubs/stubs/Sketchup/SelectionObserver.rb +115 -115
  132. data/lib/sketchup-api-stubs/stubs/Sketchup/Set.rb +211 -212
  133. data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb +259 -255
  134. data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfoObserver.rb +59 -59
  135. data/lib/sketchup-api-stubs/stubs/Sketchup/Skp.rb +40 -40
  136. data/lib/sketchup-api-stubs/stubs/Sketchup/Snap.rb +125 -0
  137. data/lib/sketchup-api-stubs/stubs/Sketchup/Style.rb +88 -69
  138. data/lib/sketchup-api-stubs/stubs/Sketchup/Styles.rb +263 -217
  139. data/lib/sketchup-api-stubs/stubs/Sketchup/Text.rb +283 -262
  140. data/lib/sketchup-api-stubs/stubs/Sketchup/Texture.rb +199 -217
  141. data/lib/sketchup-api-stubs/stubs/Sketchup/TextureWriter.rb +237 -237
  142. data/lib/sketchup-api-stubs/stubs/Sketchup/Tool.rb +924 -834
  143. data/lib/sketchup-api-stubs/stubs/Sketchup/Tools.rb +132 -132
  144. data/lib/sketchup-api-stubs/stubs/Sketchup/ToolsObserver.rb +156 -156
  145. data/lib/sketchup-api-stubs/stubs/Sketchup/UVHelper.rb +75 -75
  146. data/lib/sketchup-api-stubs/stubs/Sketchup/Vertex.rb +143 -142
  147. data/lib/sketchup-api-stubs/stubs/Sketchup/View.rb +1566 -1311
  148. data/lib/sketchup-api-stubs/stubs/Sketchup/ViewObserver.rb +71 -45
  149. data/lib/sketchup-api-stubs/stubs/Sketchup.rb +1429 -1377
  150. data/lib/sketchup-api-stubs/stubs/SketchupExtension.rb +353 -353
  151. data/lib/sketchup-api-stubs/stubs/String.rb +24 -24
  152. data/lib/sketchup-api-stubs/stubs/UI/Command.rb +399 -389
  153. data/lib/sketchup-api-stubs/stubs/UI/HtmlDialog.rb +580 -494
  154. data/lib/sketchup-api-stubs/stubs/UI/Notification.rb +280 -269
  155. data/lib/sketchup-api-stubs/stubs/UI/Toolbar.rb +258 -241
  156. data/lib/sketchup-api-stubs/stubs/UI/WebDialog.rb +636 -635
  157. data/lib/sketchup-api-stubs/stubs/UI.rb +791 -683
  158. data/lib/sketchup-api-stubs/stubs/_top_level.rb +303 -303
  159. data/lib/sketchup-api-stubs.rb +1 -1
  160. metadata +10 -24
@@ -1,522 +1,547 @@
1
- # Copyright:: Copyright 2023 Trimble Inc.
2
- # License:: The MIT License (MIT)
3
-
4
- # The {Geom::Vector2d} class represents vectors in a 2 dimensional space.
5
- #
6
- # There are numerous tutorials on 2D vectors available on the internet.
7
- #
8
- # @version LayOut 2018
9
- class Geom::Vector2d
10
-
11
- # Instance Methods
12
-
13
- # The {#%} method returns the dot product between two {Geom::Vector2d}. This is
14
- # an alias of the dot method.
15
- #
16
- # @example
17
- # vector = Geom::Vector2d.new(0, 2)
18
- # vector2 = Geom::Vector2d.new(1, 0)
19
- # d2 = vector % vector2
20
- #
21
- # @param [Geom::Vector2d] vector
22
- #
23
- # @return The dot product of the vectors
24
- #
25
- # @version LayOut 2018
26
- def %(vector)
27
- end
28
-
29
- # The {#*} method returns the cross product between two {Geom::Vector2d}. This
30
- # is an alias of the cross method.
31
- #
32
- # @example
33
- # vector = Geom::Vector2d.new(1, 0)
34
- # vector2 = Geom::Vector2d.new(0, 1)
35
- # cross = vector * vector
36
- #
37
- # @param [Geom::Vector2d] vector
38
- #
39
- # @return [Geom::Vector2d]
40
- #
41
- # @version LayOut 2018
42
- def *(vector)
43
- end
44
-
45
- # The {#+} method adds a {Geom::Vector2d} to this one.
46
- #
47
- # @example
48
- # vector = Geom::Vector2d.new(0, 2)
49
- # vector2 = Geom::Vector2d.new(1, 0)
50
- # new_vector = vector + vector2
51
- #
52
- # @param [Geom::Vector2d] vector
53
- #
54
- # @return [Geom::Vector2d]
55
- #
56
- # @version LayOut 2018
57
- def +(vector)
58
- end
59
-
60
- # The {#-} method subtracts a {Geom::Vector2d} from this one.
61
- #
62
- # @example
63
- # vector = Geom::Vector2d.new(0, 2)
64
- # vector2 = Geom::Vector2d.new(1, 0)
65
- # new_vector = vector - vector2
66
- #
67
- # @param [Geom::Vector2d] vector
68
- #
69
- # @return [Geom::Vector2d]
70
- #
71
- # @version LayOut 2018
72
- def -(vector)
73
- end
74
-
75
- # The {#==} method returns whether two {Geom::Vector2d} are equal within
76
- # tolerance.
77
- #
78
- # @example
79
- # vector = Geom::Vector2d.new(1, 0)
80
- # vector2 = Geom::Vector2d.new(0,1)
81
- # # Returns false
82
- # status = vector == vector2
83
- #
84
- # @param [Geom::Vector2d] vector
85
- #
86
- # @return [Boolean]
87
- #
88
- # @version LayOut 2018
89
- def ==(vector)
90
- end
91
-
92
- # The {#[]} method returns the value of the {Geom::Vector2d} at the specified
93
- # index.
94
- #
95
- # @example
96
- # vector = Geom::Vector2d.new(1, 2)
97
- # # retrieves the y value of 2
98
- # yvalue = vector[1]
99
- #
100
- # @param [Integer] index
101
- # The index into an array of two coordinates.
102
- #
103
- # @return [Numeric] The value for the x or y coordinate.
104
- #
105
- # @version LayOut 2018
106
- def [](index)
107
- end
108
-
109
- # The {#[]=} method sets the x or y value of the {Geom::Vector2d} based on the
110
- # specific index of the value.
111
- #
112
- # @example
113
- # point = Geom::Vector2d.new(1,2)
114
- # point[1] = 4
115
- #
116
- # @param [Numeric] index
117
- # The index for a specific x or y value in the
118
- # {Geom::Vector2d} to set
119
- #
120
- # @param [Numeric] value
121
- # The value to set for x or y
122
- #
123
- # @return [Numeric] The new x or y value if successful
124
- #
125
- # @version LayOut 2018
126
- def []=(index, value)
127
- end
128
-
129
- # The {#angle_between} method computes the angle in radians between
130
- # the {Geom::Vector2d} and another {Geom::Vector2d}.
131
- #
132
- # @example
133
- # vector = Geom::Vector2d.new(1, 0)
134
- # vector2 = Geom::Vector2d.new(-1, 0)
135
- # # returns PI
136
- # angle = vector.angle_between(vector2)
137
- #
138
- # @param [Geom::Vector2d] vector
139
- #
140
- # @return [Numeric] The angle (in radians)
141
- #
142
- # @version LayOut 2018
143
- def angle_between(vector)
144
- end
145
-
146
- # The {#clone} method makes a copy of the {Geom::Vector2d}. This method is
147
- # equivalent to vec2 = Geom::Vector2d.new(vec).
148
- #
149
- # @example
150
- # vector = Geom::Vector2d.new(1, 0)
151
- # vector2 = vector.clone
152
- #
153
- # @return [Geom::Vector2d]
154
- #
155
- # @version LayOut 2018
156
- def clone
157
- end
158
-
159
- # The {#*} method returns the cross product between two {Geom::Vector2d}. This
160
- # is an alias of the cross method.
161
- #
162
- # @example
163
- # vector = Geom::Vector2d.new(1, 0)
164
- # vector2 = Geom::Vector2d.new(0, 1)
165
- # cross = vector * vector
166
- #
167
- # @param [Geom::Vector2d] vector
168
- #
169
- # @return [Geom::Vector2d]
170
- #
171
- # @version LayOut 2018
172
- def cross(vector)
173
- end
174
-
175
- # The {#%} method returns the dot product between two {Geom::Vector2d}. This is
176
- # an alias of the dot method.
177
- #
178
- # @example
179
- # vector = Geom::Vector2d.new(0, 2)
180
- # vector2 = Geom::Vector2d.new(1, 0)
181
- # d2 = vector % vector2
182
- #
183
- # @param [Geom::Vector2d] vector
184
- #
185
- # @return The dot product of the vectors
186
- #
187
- # @version LayOut 2018
188
- def dot(vector)
189
- end
190
-
191
- # The {.new} method creates a new {Geom::Vector2d}.
192
- #
193
- # @example
194
- # # A vector that runs along the X axis.
195
- # vector = Geom::Vector2d.new(1, 0)
196
- #
197
- # @overload initialize
198
- #
199
- # @return [Geom::Vector2d]
200
- #
201
- # @overload initialize(x, y)
202
- #
203
- # @param [Numeric] x The length in the x direction
204
- # @param [Numeric] y The length in the y direction
205
- # @return [Geom::Vector2d]
206
- #
207
- # @overload initialize(vector)
208
- #
209
- # @param [Geom::Vector2d, Array(Numeric, Numeric)] vector
210
- # @return [Geom::Vector2d]
211
- #
212
- # @version LayOut 2018
213
- def initialize(*args)
214
- end
215
-
216
- # The {#inspect} method formats the {Geom::Vector2d} as a string.
217
- #
218
- # @example
219
- # point = Geom::Point2d.new(1, 2)
220
- # string = point.inspect
221
- #
222
- # @return [String] the string representation of the {Geom::Vector2d}
223
- #
224
- # @version LayOut 2018
225
- def inspect
226
- end
227
-
228
- # The {#length} method returns the length of the {Geom::Vector2d}.
229
- #
230
- # @example
231
- # vector = Geom::Vector2d.new(0, 4)
232
- # # returns 4
233
- # l = vector.length
234
- #
235
- # @return [Length] The length of the {Geom::Vector2d}
236
- #
237
- # @version LayOut 2018
238
- def length
239
- end
240
-
241
- # The {#length=} method sets the length of the {Geom::Vector2d}. The new length
242
- # must not be 0.
243
- #
244
- # @example
245
- # vector = Geom::Vector2d.new(0, 4)
246
- # l = vector.length
247
- # vector.length = 2
248
- #
249
- # @param [Numeric] length
250
- # The new length for the {Geom::Vector2d}
251
- #
252
- # @return [Numeric] The new length
253
- #
254
- # @version LayOut 2018
255
- def length=(length)
256
- end
257
-
258
- # The {#normalize} method returns a {Geom::Vector2d} that is a unit vector
259
- # of the {Geom::Vector2d}.
260
- #
261
- # @example
262
- # vector = Geom::Vector2d.new(0, 4)
263
- # # returns a new Vector2d(0, 1)
264
- # vector2 = vector.normalize
265
- #
266
- # @return [Geom::Vector2d]
267
- #
268
- # @version LayOut 2018
269
- def normalize
270
- end
271
-
272
- # The {#normalize!} method converts a {Geom::Vector2d} vector into a unit
273
- # vector. Another way to do this is vector.length = 1
274
- #
275
- # @example
276
- # vector = Geom::Vector2d.new(0, 4)
277
- # # modifies vector to be the Vector2d(0, 1)
278
- # vector.normalize!
279
- #
280
- # @version LayOut 2018
281
- def normalize!
282
- end
283
-
284
- # The {#parallel?} method determines if the {Geom::Vector2d} is parallel to
285
- # another {Geom::Vector2d} to within tolerance.
286
- #
287
- # @example
288
- # vector = Geom::Vector2d.new(0, 1)
289
- # vector2 = Geom::Vector2d.new(1, 2)
290
- # # returns true
291
- # status = vector.parallel?(vector2)
292
- #
293
- # @param [Geom::Vector2d] vector
294
- #
295
- # @return [Boolean]
296
- #
297
- # @version LayOut 2018
298
- def parallel?(vector)
299
- end
300
-
301
- # The {#perpendicular?} method determines if the {Geom::Vector2d} is
302
- # perpendicular to another {Geom::Vector2d} to within tolerance.
303
- #
304
- # @example
305
- # vector = Geom::Vector2d.new(0, 1)
306
- # vector2 = Geom::Vector2d.new(1, 2)
307
- # # returns false
308
- # status = vector.perpendicular?(vector2)
309
- #
310
- # @param [Geom::Vector2d] vector
311
- #
312
- # @return [Boolean]
313
- #
314
- # @version LayOut 2018
315
- def perpendicular?(vector)
316
- end
317
-
318
- # The {#reverse} method returns a new {Geom::Vector2d} that is the reverse of
319
- # the {Geom::Vector2d}, leaving the original unchanged.
320
- #
321
- # @example
322
- # vector = Geom::Vector2d.new(1, 2)
323
- # # returns the Vector2d(-1, -2)
324
- # vector2 = vector.reverse
325
- #
326
- # @return [Geom::Vector2d]
327
- #
328
- # @version LayOut 2018
329
- def reverse
330
- end
331
-
332
- # The {#reverse!} method reverses the {Geom::Vector2d} in place.
333
- #
334
- # @example
335
- # vector = Geom::Vector2d.new(1, 2)
336
- # # modifies vector to be the Vector2d(-1, -2)
337
- # vector.reverse!
338
- #
339
- # @version LayOut 2018
340
- def reverse!
341
- end
342
-
343
- # The {#same_direction?} method determines if the {Geom::Vector2d} is parallel
344
- # to and in the same direction as another {Geom::Vector2d} within tolerance.
345
- #
346
- # @example
347
- # vector = Geom::Vector2d.new(0, 1)
348
- # vector2 = Geom::Vector2d.new(1, 2)
349
- # # returns true
350
- # status = vector.sime_direction?(vector2)
351
- #
352
- # @param [Geom::Vector2d] vector
353
- #
354
- # @return [Boolean]
355
- #
356
- # @version LayOut 2018
357
- def same_direction?(vector)
358
- end
359
-
360
- # The {#set!} method sets the values of the {Geom::Vector2d}.
361
- #
362
- # @example
363
- # vector = Geom::Vector2d.new(1, 2)
364
- # vector = vector.set!([4, 5])
365
- #
366
- # @overload set!(vector)
367
- #
368
- # @param [Geom::Vector2d, Array(Numeric, Numeric)] vector
369
- # @return [Geom::Vector2d]
370
- #
371
- # @overload set!(x, y)
372
- #
373
- # @param [Numeric] x
374
- # @param [Numeric] y
375
- # @return [Geom::Vector2d]
376
- #
377
- # @version LayOut 2018
378
- def set!(*args)
379
- end
380
-
381
- # The {#to_a} method retrieves the coordinates of the {Geom::Vector2d} in an
382
- # Array.
383
- #
384
- # @example
385
- # a = vector.to_a
386
- #
387
- # @return [Array(Numeric, Numeric)]
388
- #
389
- # @version LayOut 2018
390
- def to_a
391
- end
392
-
393
- # The {#to_s} method returns a string representation of the {Geom::Vector2d}.
394
- #
395
- # @example
396
- # point = Geom::Vector2d.new(1, 2)
397
- # str = point.to_s
398
- #
399
- # @return [String] the string representation of the {Geom::Vector2d}
400
- #
401
- # @version LayOut 2018
402
- def to_s
403
- end
404
-
405
- # The {#transform} method applies a transformation to a vector, returning a new
406
- # vector. The original vector is unchanged by this method.
407
- #
408
- # @example
409
- # vector = Geom::Vector2d.new(4, 5)
410
- # transformation = Geom::Transformation2d.new([1, 0, 0, 1, 2, 3])
411
- # # vector2 will be (6, 8)
412
- # vector2 = vector.transform(transformation)
413
- #
414
- # @param [Geom::Transformation2d] transform
415
- # A transformation object to apply to the vector.
416
- #
417
- # @return [Geom::Vector2d] the newly transformed vector
418
- #
419
- # @version LayOut 2019
420
- def transform(transform)
421
- end
422
-
423
- # The {#transform!} method applies a transformation to a vector. The vector
424
- # itself is modified.
425
- #
426
- # @example
427
- # vector = Geom::Vector2d.new(4, 5)
428
- # transformation = Geom::Transformation2d.new([1, 0, 0, 1, 2, 3])
429
- # # vector will be (6, 8)
430
- # vector.transform!(transformation)
431
- #
432
- # @param [Geom::Transformation2d] transform
433
- # A Transformation object to apply to the vector.
434
- #
435
- # @return [Geom::Vector2d] the transformed vector
436
- #
437
- # @version LayOut 2019
438
- def transform!(transform)
439
- end
440
-
441
- # The {#unit_vector?} method returns whether the {Geom::Vector2d} is a unit
442
- # vector. This is equivalent to vector.length == 1.0
443
- #
444
- # @example
445
- # vector = Geom::Vector2d.new(1, 0)
446
- # # returns true
447
- # status = vector.unit_vector
448
- #
449
- # @return [Boolean]
450
- #
451
- # @version LayOut 2018
452
- def unit_vector?
453
- end
454
-
455
- # The {#valid?} method verifies if a {Geom::Vector2d} is valid. A
456
- # {Geom::Vector2d} is valid if its length is not zero.
457
- #
458
- # @example
459
- # vector = Geom::Vector2d.new(0, 4)
460
- # status = vector.valid
461
- #
462
- # @return [Boolean]
463
- #
464
- # @version LayOut 2018
465
- def valid?
466
- end
467
-
468
- # The {#x} method retrieves the x value of the {Geom::Vector2d}.
469
- #
470
- # @example
471
- # vector = Geom::Vector2d.new(1, 2)
472
- # x = vector.x
473
- #
474
- # @return [Numeric]
475
- #
476
- # @version LayOut 2018
477
- def x
478
- end
479
-
480
- # The {#x=} method sets the x coordinate of the {Geom::Vector2d}.
481
- #
482
- # @example
483
- # vector = Geom::Vector2d.new(1, 2)
484
- # vector.x = 7
485
- #
486
- # @param [Numeric] x
487
- # The desired x value of the {Geom::Vector2d}
488
- #
489
- # @return [Numeric] The new x value of the {Geom::Vector2d}
490
- #
491
- # @version LayOut 2018
492
- def x=(x)
493
- end
494
-
495
- # The {#y} method retrieves the y value of the {Geom::Vector2d}.
496
- #
497
- # @example
498
- # vector = Geom::Vector2d.new(1, 2)
499
- # y = vector.y
500
- #
501
- # @return [Numeric]
502
- #
503
- # @version LayOut 2018
504
- def y
505
- end
506
-
507
- # The {#y=} method sets the y coordinate of the {Geom::Vector2d}.
508
- #
509
- # @example
510
- # vector = Geom::Vector2d.new(1, 2)
511
- # vector.y = 7
512
- #
513
- # @param [Numeric] y
514
- # The desired y value of the {Geom::Vector2d}
515
- #
516
- # @return [Numeric] The new y value of the {Geom::Vector2d}
517
- #
518
- # @version LayOut 2018
519
- def y=(y)
520
- end
521
-
522
- end
1
+ # Copyright:: Copyright 2026 Trimble Inc.
2
+ # License:: The MIT License (MIT)
3
+
4
+ # The {Geom::Vector2d} class represents vectors in a 2 dimensional space.
5
+ #
6
+ # There are numerous tutorials on 2D vectors available on the internet.
7
+ #
8
+ # @version LayOut 2018
9
+ class Geom::Vector2d
10
+
11
+ # Instance Methods
12
+
13
+ # The {#%} method is used to compute the dot product between two vectors.
14
+ #
15
+ # This is an alias of the {#dot} method.
16
+ #
17
+ # @example
18
+ # vector1 = Geom::Vector2d.new(4, 5)
19
+ # vector2 = Geom::Vector2d.new(7, 1)
20
+ # # The result is 33
21
+ # dot = vector1 % vector2
22
+ #
23
+ # @param [Geom::Vector2d, Array(Float, Float)] vector
24
+ #
25
+ # @return [Float]
26
+ #
27
+ # @see #dot
28
+ #
29
+ # @version SketchUp 6.0
30
+ def %(vector)
31
+ end
32
+
33
+ # The {#*} method returns the cross product between two {Geom::Vector2d}. This
34
+ # is an alias of the cross method.
35
+ #
36
+ # @example
37
+ # vector1 = Geom::Vector2d.new(2, 5)
38
+ # vector2 = Geom::Vector2d.new(5, 1)
39
+ # # The result is -23
40
+ # cross = vector1 * vector2
41
+ #
42
+ # @param [Geom::Vector2d, Array(Float, Float)] vector
43
+ #
44
+ # @return [Float]
45
+ #
46
+ # @see #cross
47
+ #
48
+ # @version LayOut 2018
49
+ def *(vector)
50
+ end
51
+
52
+ # The {#+} method adds a {Geom::Vector2d} to this one.
53
+ #
54
+ # @example
55
+ # vector1 = Geom::Vector2d.new(0, 2)
56
+ # vector2 = Geom::Vector2d.new(1, 0)
57
+ # new_vector = vector1 + vector2
58
+ #
59
+ # @param [Geom::Vector2d, Array(Float, Float)] vector
60
+ #
61
+ # @return [Geom::Vector2d]
62
+ #
63
+ # @version LayOut 2018
64
+ def +(vector)
65
+ end
66
+
67
+ # The {#-} method subtracts a {Geom::Vector2d} from this one.
68
+ #
69
+ # @example
70
+ # vector1 = Geom::Vector2d.new(0, 2)
71
+ # vector2 = Geom::Vector2d.new(1, 0)
72
+ # new_vector = vector1 - vector2
73
+ #
74
+ # @param [Geom::Vector2d, Array(Float, Float)] vector
75
+ #
76
+ # @return [Geom::Vector2d]
77
+ #
78
+ # @version LayOut 2018
79
+ def -(vector)
80
+ end
81
+
82
+ # The {#==} method returns whether two {Geom::Vector2d} are equal within
83
+ # tolerance.
84
+ #
85
+ # @example
86
+ # vector1 = Geom::Vector2d.new(1, 0)
87
+ # vector2 = Geom::Vector2d.new(0, 1)
88
+ # # Returns false
89
+ # status = vector1 == vector2
90
+ #
91
+ # @param [Geom::Vector2d, Array(Float, Float)] vector
92
+ #
93
+ # @return [Boolean]
94
+ #
95
+ # @version LayOut 2018
96
+ def ==(vector)
97
+ end
98
+
99
+ # The {#[]} method returns the value of the {Geom::Vector2d} at the specified
100
+ # index.
101
+ #
102
+ # @example
103
+ # vector = Geom::Vector2d.new(1, 2)
104
+ # # Retrieves the y value of 2
105
+ # yvalue = vector[1]
106
+ #
107
+ # @param [Integer] index
108
+ # The index into an array of two coordinates.
109
+ #
110
+ # @return [Float] The value for the x or y coordinate.
111
+ #
112
+ # @version LayOut 2018
113
+ def [](index)
114
+ end
115
+
116
+ # The {#[]=} method sets the x or y value of the {Geom::Vector2d} based on the
117
+ # specific index of the value.
118
+ #
119
+ # @example
120
+ # vector = Geom::Vector2d.new(1, 2)
121
+ # vector[1] = 4
122
+ #
123
+ # @param [Integer] index
124
+ # The index for a specific x or y value in the
125
+ # {Geom::Vector2d} to set
126
+ #
127
+ # @param [Float] value
128
+ # The value to set for x or y
129
+ #
130
+ # @return [Float] The new x or y value if successful
131
+ #
132
+ # @version LayOut 2018
133
+ def []=(index, value)
134
+ end
135
+
136
+ # The {#angle_between} method computes the angle in radians between
137
+ # the {Geom::Vector2d} and another {Geom::Vector2d}.
138
+ #
139
+ # @example
140
+ # vector1 = Geom::Vector2d.new(1, 0)
141
+ # vector2 = Geom::Vector2d.new(-1, 0)
142
+ # # Returns PI
143
+ # angle = vector1.angle_between(vector2)
144
+ #
145
+ # @param [Geom::Vector2d, Array(Float, Float)] vector
146
+ #
147
+ # @return [Float] The angle (in radians)
148
+ #
149
+ # @version LayOut 2018
150
+ def angle_between(vector)
151
+ end
152
+
153
+ # The {#clone} method makes a copy of the {Geom::Vector2d}. This method is
154
+ # equivalent to vec2 = Geom::Vector2d.new(vec).
155
+ #
156
+ # @example
157
+ # vector = Geom::Vector2d.new(1, 0)
158
+ # new_vector = vector.clone
159
+ #
160
+ # @return [Geom::Vector2d]
161
+ #
162
+ # @version LayOut 2018
163
+ def clone
164
+ end
165
+
166
+ # The {#cross} method returns the cross product between two {Geom::Vector2d}s.
167
+ #
168
+ # The cross product, also called the vector product, is an operation on two
169
+ # vectors. The cross product of two vectors produces a third vector which is
170
+ # perpendicular to the plane in which the first two lie.
171
+ #
172
+ # @example
173
+ # vector1 = Geom::Vector2d.new(3, 3)
174
+ # vector2 = Geom::Vector2d.new(2, 5)
175
+ # # The result is 9
176
+ # cross = vector1.cross(vector2)
177
+ #
178
+ # @param [Geom::Vector2d, Array(Float, Float)] vector
179
+ #
180
+ # @return [Float]
181
+ #
182
+ # @see #*
183
+ #
184
+ # @version LayOut 2018
185
+ def cross(vector)
186
+ end
187
+
188
+ # The {#dot} method is used to compute the dot product between two vectors.
189
+ #
190
+ # @example
191
+ # vector1 = Geom::Vector2d.new(4, 1)
192
+ # # The result is 14
193
+ # vector2 = Geom::Vector2d.new(3, 2)
194
+ # dot = vector1.dot(vector2)
195
+ #
196
+ # @param [Geom::Vector2d, Array(Float, Float)] vector
197
+ #
198
+ # @return [Float]
199
+ #
200
+ # @see #%
201
+ #
202
+ # @version SketchUp 6.0
203
+ def dot(vector)
204
+ end
205
+
206
+ # The {.new} method creates a new {Geom::Vector2d}.
207
+ #
208
+ # @example
209
+ # # A vector that runs along the X axis.
210
+ # vector1 = Geom::Vector2d.new(1, 0)
211
+ #
212
+ # vector2 = Geom::Vector2d.new([5, 6])
213
+ #
214
+ # @overload initialize
215
+ #
216
+ # @return [Geom::Vector2d]
217
+ #
218
+ # @overload initialize(x, y)
219
+ #
220
+ # @param [Float] x The length in the x direction
221
+ # @param [Float] y The length in the y direction
222
+ # @return [Geom::Vector2d]
223
+ #
224
+ # @overload initialize(vector)
225
+ #
226
+ # @param [Geom::Vector2d, Array(Float, Float)] vector
227
+ # @return [Geom::Vector2d]
228
+ #
229
+ # @version LayOut 2018
230
+ def initialize(*args)
231
+ end
232
+
233
+ # The {#inspect} method formats the {Geom::Vector2d} as a string.
234
+ #
235
+ # @example
236
+ # vector = Geom::Vector2d.new(1, 2)
237
+ # string = vector.inspect
238
+ #
239
+ # @return [String] the string representation of the {Geom::Vector2d}
240
+ #
241
+ # @version LayOut 2018
242
+ def inspect
243
+ end
244
+
245
+ # The {#length} method returns the length of the {Geom::Vector2d}.
246
+ #
247
+ # @example
248
+ # vector = Geom::Vector2d.new(0, 4)
249
+ # # The result is 4
250
+ # length = vector.length
251
+ #
252
+ # @return [Length] The length of the {Geom::Vector2d}
253
+ #
254
+ # @version LayOut 2018
255
+ def length
256
+ end
257
+
258
+ # The {#length=} method sets the length of the {Geom::Vector2d}. The new length
259
+ # must not be 0.
260
+ #
261
+ # @example
262
+ # vector = Geom::Vector2d.new(0, 4)
263
+ # vector.length = 2
264
+ #
265
+ # @param [Float] length
266
+ # The new length for the {Geom::Vector2d}
267
+ #
268
+ # @return [Length] The new length
269
+ #
270
+ # @version LayOut 2018
271
+ def length=(length)
272
+ end
273
+
274
+ # The {#normalize} method returns a {Geom::Vector2d} that is a unit vector
275
+ # of the {Geom::Vector2d}.
276
+ #
277
+ # @example
278
+ # vector = Geom::Vector2d.new(0, 4)
279
+ # # The result is a Vector2d(0, 1)
280
+ # new_vector = vector.normalize
281
+ #
282
+ # @return [Geom::Vector2d]
283
+ #
284
+ # @version LayOut 2018
285
+ def normalize
286
+ end
287
+
288
+ # The {#normalize!} method converts a {Geom::Vector2d} vector into a unit
289
+ # vector. Another way to do this is +vector.length = 1.0+
290
+ #
291
+ # @example
292
+ # vector = Geom::Vector2d.new(0, 4)
293
+ # # Modifies vector to be the Vector2d(0, 1)
294
+ # vector.normalize!
295
+ #
296
+ # @version LayOut 2018
297
+ def normalize!
298
+ end
299
+
300
+ # The {#parallel?} method determines if two {Geom::Vector2d}s are parallel within a
301
+ # tolerance. Two vectors are parallel if there exists a scalar multiple between them.
302
+ #
303
+ # @example
304
+ # vector1 = Geom::Vector2d.new(0, 1)
305
+ # vector2 = Geom::Vector2d.new(0, -9)
306
+ # # Returns true
307
+ # status = vector1.parallel?(vector2)
308
+ #
309
+ # @param [Geom::Vector2d, Array(Float, Float)] vector
310
+ #
311
+ # @return [Boolean]
312
+ #
313
+ # @version LayOut 2018
314
+ def parallel?(vector)
315
+ end
316
+
317
+ # The {#perpendicular?} method determines if two {Geom::Vector2d}s are
318
+ # perpendicular within a tolerance. Two vectors are considered
319
+ # perpendicular if their dot product is zero.
320
+ #
321
+ # @example
322
+ # vector1 = Geom::Vector2d.new(0, 5)
323
+ # vector2 = Geom::Vector2d.new(1, 0)
324
+ # # Returns true
325
+ # status = vector1.perpendicular?(vector2)
326
+ #
327
+ # @param [Geom::Vector2d, Array(Float, Float)] vector
328
+ #
329
+ # @return [Boolean]
330
+ #
331
+ # @version LayOut 2018
332
+ def perpendicular?(vector)
333
+ end
334
+
335
+ # The {#reverse} method returns a new {Geom::Vector2d} that is the reverse of
336
+ # the {Geom::Vector2d}, leaving the original unchanged.
337
+ #
338
+ # @example
339
+ # vector = Geom::Vector2d.new(1, 2)
340
+ # # The result is a Vector2d(-1, -2)
341
+ # new_vector = vector.reverse
342
+ #
343
+ # @return [Geom::Vector2d]
344
+ #
345
+ # @version LayOut 2018
346
+ def reverse
347
+ end
348
+
349
+ # The {#reverse!} method reverses the {Geom::Vector2d} in place.
350
+ #
351
+ # @example
352
+ # vector = Geom::Vector2d.new(1, 2)
353
+ # # Modifies vector to be the Vector2d(-1, -2)
354
+ # vector.reverse!
355
+ #
356
+ # @version LayOut 2018
357
+ def reverse!
358
+ end
359
+
360
+ # The {#same_direction?} method determines if the {Geom::Vector2d} is parallel
361
+ # to and in the same direction as another {Geom::Vector2d} within tolerance.
362
+ #
363
+ # @example
364
+ # vector1 = Geom::Vector2d.new(0, 1)
365
+ # vector2 = Geom::Vector2d.new(1, 2)
366
+ # # Returns false
367
+ # status = vector1.same_direction?(vector2)
368
+ #
369
+ # @example
370
+ # vector = Geom::Vector2d.new(0, 2)
371
+ # # Returns true
372
+ # status = vector.same_direction?([0, 4])
373
+ #
374
+ # @param [Geom::Vector2d, Array(Float, Float)] vector
375
+ #
376
+ # @return [Boolean]
377
+ #
378
+ # @version LayOut 2018
379
+ def same_direction?(vector)
380
+ end
381
+
382
+ # The {#set!} method sets the values of the {Geom::Vector2d}.
383
+ #
384
+ # @example
385
+ # vector = Geom::Vector2d.new(1, 2)
386
+ # vector = vector.set!([4, 5])
387
+ #
388
+ # @overload set!(vector)
389
+ #
390
+ # @param [Geom::Vector2d, Array(Float, Float)] vector
391
+ # @return [Geom::Vector2d]
392
+ #
393
+ # @overload set!(x, y)
394
+ #
395
+ # @param [Float] x
396
+ # @param [Float] y
397
+ # @return [Geom::Vector2d]
398
+ #
399
+ # @version LayOut 2018
400
+ def set!(*args)
401
+ end
402
+
403
+ # The {#to_a} method retrieves the coordinates of the {Geom::Vector2d} in an
404
+ # Array.
405
+ #
406
+ # @example
407
+ # vector = Geom::Vector2d.new(1, 2)
408
+ # array = vector.to_a
409
+ #
410
+ # @return [Array(Float, Float)]
411
+ #
412
+ # @version LayOut 2018
413
+ def to_a
414
+ end
415
+
416
+ # The {#to_s} method returns a string representation of the {Geom::Vector2d}.
417
+ #
418
+ # @example
419
+ # vector = Geom::Vector2d.new(1, 2)
420
+ # string = vector.to_s
421
+ #
422
+ # @return [String] the string representation of the {Geom::Vector2d}
423
+ #
424
+ # @version LayOut 2018
425
+ def to_s
426
+ end
427
+
428
+ # The {#transform} method applies a transformation to a vector, returning a new
429
+ # vector. The original vector is unchanged by this method.
430
+ #
431
+ # @example
432
+ # vector = Geom::Vector2d.new(3, 2)
433
+ # point = Geom::Point2d.new(0, 1)
434
+ # transformation = Geom::Transformation2d.scaling(point, 2)
435
+ # # The result is a Vector2d(6, 4)
436
+ # new_vector = vector.transform(transformation)
437
+ #
438
+ # @param [Geom::Transformation2d] transform
439
+ # A transformation object to apply to the vector.
440
+ #
441
+ # @return [Geom::Vector2d] the newly transformed vector
442
+ #
443
+ # @version LayOut 2019
444
+ def transform(transform)
445
+ end
446
+
447
+ # The {#transform!} method applies a transformation to a vector. The vector
448
+ # itself is modified.
449
+ #
450
+ # @example
451
+ # vector = Geom::Vector2d.new(4, 5)
452
+ # point = Geom::Point2d.new(8, 9)
453
+ # transformation = Geom::Transformation2d.scaling(point, 3)
454
+ # # The result is a Vector2d(12, 15)
455
+ # vector.transform!(transformation)
456
+ #
457
+ # @param [Geom::Transformation2d] transform
458
+ # A Transformation object to apply to the vector.
459
+ #
460
+ # @return [Geom::Vector2d] the transformed vector
461
+ #
462
+ # @version LayOut 2019
463
+ def transform!(transform)
464
+ end
465
+
466
+ # The {#unit_vector?} method returns whether the {Geom::Vector2d} is a unit
467
+ # vector. This is equivalent to vector.length == 1.0
468
+ #
469
+ # @example
470
+ # vector = Geom::Vector2d.new(1, 0)
471
+ # # Returns true
472
+ # status = vector.unit_vector?
473
+ #
474
+ # @return [Boolean]
475
+ #
476
+ # @version LayOut 2018
477
+ def unit_vector?
478
+ end
479
+
480
+ # The {#valid?} method verifies if a {Geom::Vector2d} is valid. A
481
+ # {Geom::Vector2d} is valid if its length is not zero.
482
+ #
483
+ # @example
484
+ # vector = Geom::Vector2d.new(0, 4)
485
+ # status = vector.valid?
486
+ #
487
+ # @return [Boolean]
488
+ #
489
+ # @version LayOut 2018
490
+ def valid?
491
+ end
492
+
493
+ # The {#x} method retrieves the x value of the {Geom::Vector2d}.
494
+ #
495
+ # @example
496
+ # vector = Geom::Vector2d.new(1, 2)
497
+ # x = vector.x
498
+ #
499
+ # @return [Float]
500
+ #
501
+ # @version LayOut 2018
502
+ def x
503
+ end
504
+
505
+ # The {#x=} method sets the x coordinate of the {Geom::Vector2d}.
506
+ #
507
+ # @example
508
+ # vector = Geom::Vector2d.new(1, 2)
509
+ # vector.x = 7
510
+ #
511
+ # @param [Float] x
512
+ # The desired x value of the {Geom::Vector2d}
513
+ #
514
+ # @return [Float] The new x value of the {Geom::Vector2d}
515
+ #
516
+ # @version LayOut 2018
517
+ def x=(x)
518
+ end
519
+
520
+ # The {#y} method retrieves the y value of the {Geom::Vector2d}.
521
+ #
522
+ # @example
523
+ # vector = Geom::Vector2d.new(1, 2)
524
+ # y = vector.y
525
+ #
526
+ # @return [Float]
527
+ #
528
+ # @version LayOut 2018
529
+ def y
530
+ end
531
+
532
+ # The {#y=} method sets the y coordinate of the {Geom::Vector2d}.
533
+ #
534
+ # @example
535
+ # vector = Geom::Vector2d.new(1, 2)
536
+ # vector.y = 7
537
+ #
538
+ # @param [Float] y
539
+ # The desired y value of the {Geom::Vector2d}
540
+ #
541
+ # @return [Float] The new y value of the {Geom::Vector2d}
542
+ #
543
+ # @version LayOut 2018
544
+ def y=(y)
545
+ end
546
+
547
+ end