Chalkboard - v3.0.1
    Preparing search index...

    Function fromCartesianToAlternate

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

      Parameters

      • vect: ChalkboardVector

        The vector

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

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

      Returns ChalkboardVector

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