BinOp

org.abh80.nf.core.math.Vector3D.BinOp
implicit class BinOp(self: Vector3D)

Provides arithmetic and geometric operations for Vector3D.

Value parameters

self

The vector instance.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def *(scalar: Double): Vector3D

Multiplies the vector by a scalar.

Multiplies the vector by a scalar.

Value parameters

scalar

The scalar value.

Attributes

Returns

The scaled vector.

def +(other: Vector3D): Vector3D

Adds two vectors.

Adds two vectors.

Value parameters

other

The other vector.

Attributes

Returns

The sum vector.

def -(other: Vector3D): Vector3D

Subtracts another vector from this vector.

Subtracts another vector from this vector.

Value parameters

other

The other vector.

Attributes

Returns

The difference vector.

def /(scalar: Double): Vector3D

Divides the vector by a scalar.

Divides the vector by a scalar.

Value parameters

scalar

The scalar value.

Attributes

Returns

The scaled vector.

def X(other: Vector3D): Vector3D

Computes the cross product of two vectors.

Computes the cross product of two vectors.

Value parameters

other

The other vector.

Attributes

Returns

The cross product vector.

def dot(other: Vector3D): Double

Computes the dot product of two vectors.

Computes the dot product of two vectors.

Value parameters

other

The other vector.

Attributes

Returns

The dot product.

def ~(other: Vector3D, epsilon: Double): Boolean

Checks if two vectors are approximately equal within a given epsilon.

Checks if two vectors are approximately equal within a given epsilon.

Value parameters

epsilon

The tolerance.

other

The other vector.

Attributes

Returns

True if all components are within epsilon, false otherwise.