@@ -231,6 +231,37 @@ case class Vec4f(x: Float, y: Float, z: Float, w: Float) extends VecFloat[Vec4f]
231231 */
232232 def angle (x : Double , y : Double , z : Double , w : Double ): Double = this .toDouble.angle(Vec4d (x, y, z, w))
233233
234+ /**
235+ * Returns a vector whose components are the multiplicative inverse of this vectors components.
236+ *
237+ * @return A vector whose components are the multiplicative inverse of this vectors components
238+ */
239+ override def inverse : Vec4f = Vec4f (1.0f / this .x, 1.0f / this .y, 1.0f / this .z, 1.0f / this .w)
240+
241+ /**
242+ * Returns the component-wise division between this vector and the given scalars.
243+ *
244+ * @param x Value by which the X component is divided
245+ * @param y Value by which the Y component is divided
246+ * @param z Value by which the Z component is divided
247+ * @param w Value by which the W component is divided
248+ * @return The component-wise division between this vector and the given scalars.
249+ */
250+ def / (x : Float , y : Float , z : Float , w : Float ): Vec4f = Vec4f (this .x / x, this .y / y, this .z / z, this .w / w)
251+
252+ /**
253+ * Returns the component-wise division between this vector and the given scalars.
254+ *
255+ * This method can be used in place of the '/' operator for better interoperability with Java.
256+ *
257+ * @param x Value by which the X component is divided
258+ * @param y Value by which the Y component is divided
259+ * @param z Value by which the Z component is divided
260+ * @param w Value by which the W component is divided
261+ * @return The component-wise division between this vector and the given scalars.
262+ */
263+ def divide (x : Float , y : Float , z : Float , w : Float ): Vec4f = this / (x, y, z, w)
264+
234265 /**
235266 * Returns a vector with all components in absolute value.
236267 *
0 commit comments