Function fromCartesianToAlternate

Converts a vector from the Cartesian coordinate system to an alternate coordinate system.

// Returns (1, 0) (radius and angle of the vector (1, 0))
const v = Chalkboard.vect.fromCartesianToAlternate(Chalkboard.vect.init(1, 0), "polar");
  • Parameters

    • vect: ChalkboardVector

      The vector

    • type: "polar" | "bipolar" | "cylindrical" | "spherical"

      The alternate coordinate system, which can be "polar", "bipolar", "cylindrical", or "spherical"

    Returns ChalkboardVector