Class PolarToCartesian

    • Field Detail

      • magnitude

        public TypedIOPort magnitude
        The input port for the magnitude component, which has type DoubleToken.
      • angle

        public TypedIOPort angle
        The input port for the angle component (in radians), which has type DoubleToken.
      • x

        public TypedIOPort x
        The output port for the x coordinate, which has type DoubleToken.
      • y

        public TypedIOPort y
        The output port for the y coordinate, which has type DoubleToken.
    • Method Detail

      • fire

        public void fire()
                  throws IllegalActionException
        Consume a double token from each of the two input ports (magnitude and angle) and output a double token on each of the two output ports (x and y). The output is a Cartesian representation of the coordinates given at the inputs in polar form. The angle is in radians.
        Specified by:
        fire in interface Executable
        Overrides:
        fire in class AtomicActor<TypedIOPort>
        Throws:
        IllegalActionException - If there is no director.