code: public void mul(double b, IVector result) {
          if (result.size != size) result.reshape(size);
  
          int i;
          for (i = 0; i < size; i++) {
              result.realvector[i] = realvector[i] * b;
              result.imagvector[i] = imagvector[i] * b;
          }
      }
docs: Multiplication from a vectors with an double