Cartesian

com.phasmidsoftware.xmldoc.core.Cartesian
case class Cartesian(x: Double, y: Double, z: Double)

Represents a point or vector in a three-dimensional Cartesian coordinate system.

Value parameters

x

The x-coordinate of the Cartesian point.

y

The y-coordinate of the Cartesian point.

z

The z-coordinate of the Cartesian point.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def diff(c: Cartesian)(f: Cartesian => Double): Double

Computes the difference between the value of the function f applied to the given Cartesian point and the value of the same function applied to the current Cartesian point.

Computes the difference between the value of the function f applied to the given Cartesian point and the value of the same function applied to the current Cartesian point.

Value parameters

c

The Cartesian point to compare against the current Cartesian point.

f

A function that takes a Cartesian point as input and returns a Double value, representing a specific property or calculation on the Cartesian point.

Attributes

Returns

The difference between the result of applying the function f to the given Cartesian point and the result of applying it to the current Cartesian point.

infix def distance(c: Cartesian): Double

Calculates the Euclidean distance between the current Cartesian point and another Cartesian point.

Calculates the Euclidean distance between the current Cartesian point and another Cartesian point.

Value parameters

c

The Cartesian point to which the distance is to be calculated.

Attributes

Returns

The Euclidean distance between the current Cartesian point and the specified point.

def dotProduct(c: Cartesian): Double

Computes the dot product of the current Cartesian point with another Cartesian point.

Computes the dot product of the current Cartesian point with another Cartesian point.

Value parameters

c

The Cartesian point with which the dot product is to be computed.

Attributes

Returns

The dot product of the two Cartesian points as a Double value.

infix def vector(c: Cartesian): Cartesian

Computes the vector difference between this Cartesian point and another Cartesian point.

Computes the vector difference between this Cartesian point and another Cartesian point.

Value parameters

c

The Cartesian point to subtract from this point.

Attributes

Returns

A new Cartesian object representing the vector difference.

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product