/*
Method: $prod

Returns the result of multiplying two <Complex> numbers.

Alters the original object.

Parameters:

pos - A <Complex> instance.

Returns:

The result of multiplying two complex numbers.
197890
function(pos) {
        var x = this.x, y = this.y;
        this.x = x*pos.x - y*pos.y;
        this.y = y*pos.x + x*pos.y;
        return this;
    }
871338
function getElementPos(pos) {
    var l = 0
    for (var i = 0; i < pos - 1; i++) { l += elements[i] }
    return l
  }
26864
function _addPos(pos1, pos2) {
        return {line: pos1.line + pos2.line, ch: (pos2.line === 0 ? pos1.ch + pos2.ch : pos2.ch)};
    }
457363
function sphericalCoordinates(pos){
    var rad = len(pos);
    var inc = Math.acos(pos.z / rad) / Math.PI;
    var ang = Math.atan2(pos.y, pos.x) / (Math.PI*2);
    return {rad: rad, ang: ang, inc: inc};
  }
399324
public function getByPosition($pos)
    {
        switch ($pos) {
            case 0:
                return $this->getCode();
                break;
            case 1:
                return $this->getAtosCode();
                break;
            case 2:
                return $this->getDecimals();
                break;
            default:
                return null;
                break;
        } // switch()
    }
505900
function positionRectangleInsideAnother(pos, a, b) {
    var aWidth = a.x2 - a.x1;
    var aHeight = a.y2 - a.y1;

    var bWidth = b.x2 - b.x1;
    var bHeight = b.y2 - b.y1;

    if (bHeight <= aHeight || bWidth <= aWidth) {
        return a;
    }

    var adjusted;
    switch (pos) {
        case "center":
            return {
                x1: a.x1 + (bWidth - aWidth)/2,
                x2: a.x2 + (bWidth - aWidth)/2,
                y1: a.y1 + (bHeight - aHeight)/2,
                y2: a.y2 + (bHeight - aHeight)/2
            };
        case "ne":
            return {
                x1: a.x1 + (bWidth - aWidth),
                x2: a.x2 + (bWidth - aWidth),
                y1: a.y1,
                y2: a.y2
            };
        case "se":
            return {
                x1: a.x1 + (bWidth - aWidth),
                x2: a.x2 + (bWidth - aWidth),
                y1: a.y1 + (bHeight - aHeight),
                y2: a.y2 + (bHeight - aHeight)
            };
        case "sw":
            return {
                x1: a.x1,
                x2: a.x2,
                y1: a.y1 + (bHeight - aHeight),
                y2: a.y2 + (bHeight - aHeight)
            };
        case "nw":
        default:
            return a;
    }

    return {}
}
270760
public function getByPosition($pos)
    {
        switch ($pos) {
            case 0:
                return $this->getId();
                break;
            case 1:
                return $this->getCreatedAt();
                break;
            case 2:
                return $this->getUpdatedAt();
                break;
            default:
                return null;
                break;
        } // switch()
    }
635337
def pol2cart(theta, rho):
    """"""
    x = rho * np.cos(theta)
    y = rho * np.sin(theta)
    return x, y
686361
public function getByPosition($pos)
    {
        switch ($pos) {
            case 0:
                return $this->getId();
                break;
            case 1:
                return $this->getName();
                break;
            case 2:
                return $this->getDescription();
                break;
            case 3:
                return $this->getCreateDate();
                break;
            case 4:
                return $this->getUpdateDate();
                break;
            case 5:
                return $this->getStatus();
                break;
            default:
                return null;
                break;
        } // switch()
    }
434767
def _posn(self, bounds, idx):
        """"""
        lo,hi = bounds[0],bounds[1]
        assert idx >= lo and idx <= hi, \
               f"Array index {idx} out of bounds: {bounds}\n"
   
        return idx-lo
524258
public function getValuesForPosition($pos) {
        $arr = array();
        foreach ($this->rows as $key => $row) {
            $arr[$key] = $row->getValueForPosition($pos);
        }
        return $arr;
    }
1096044
public function getByPosition($pos)
    {
        switch ($pos) {
            case 0:
                return $this->getId();
                break;
            case 1:
                return $this->getAttributeAvId();
                break;
            case 2:
                return $this->getAttributeAttributeTypeId();
                break;
            case 3:
                return $this->getLocale();
                break;
            case 4:
                return $this->getValue();
                break;
            case 5:
                return $this->getCreatedAt();
                break;
            case 6:
                return $this->getUpdatedAt();
                break;
            default:
                return null;
                break;
        } // switch()
    }
648099
def Point(pos=(0, 0, 0), r=12, c="red", alpha=1):
    """"""
    if len(pos) == 2:
        pos = (pos[0], pos[1], 0)
    actor = Points([pos], r, c, alpha)
    return actor
580931
public function getByPosition($pos)
    {
        switch ($pos) {
            case 0:
                return $this->getId();
                break;
            case 1:
                return $this->getFeatureId();
                break;
            case 2:
                return $this->getFeatureTypeId();
                break;
            default:
                return null;
                break;
        } // switch()
    }
1259942
public function getByPosition($pos)
    {
        switch ($pos) {
            case 0:
                return $this->getId();
                break;
            case 1:
                return $this->getPersonId();
                break;
            case 2:
                return $this->getFunctionId();
                break;
            case 3:
                return $this->getCreatedAt();
                break;
            case 4:
                return $this->getUpdatedAt();
                break;
            default:
                return null;
                break;
        } // switch()
    }
671246
def posnegtoggle(number):
    
    if bool(number > 0):
        return number - number * 2
    elif bool(number < 0):
        return number + abs(number) * 2
    elif bool(number == 0):
        return number
1091319
public function getByPosition($pos)
    {
        switch ($pos) {
            case 0:
                return $this->getId();
                break;
            case 1:
                return $this->getTitle();
                break;
            case 2:
                return $this->getSlug();
                break;
            case 3:
                return $this->getAthleteLabel();
                break;
            case 4:
                return $this->getObjectSlug();
                break;
            case 5:
                return $this->getObjectLabel();
                break;
            case 6:
                return $this->getObjectPluralLabel();
                break;
            case 7:
                return $this->getSkillSlug();
                break;
            case 8:
                return $this->getSkillLabel();
                break;
            case 9:
                return $this->getSkillPluralLabel();
                break;
            case 10:
                return $this->getSkillPictureUrl();
                break;
            case 11:
                return $this->getGroupSlug();
                break;
            case 12:
                return $this->getGroupLabel();
                break;
            case 13:
                return $this->getGroupPluralLabel();
                break;
            case 14:
                return $this->getTransitionLabel();
                break;
            case 15:
                return $this->getTransitionPluralLabel();
                break;
            case 16:
                return $this->getTransitionsSlug();
                break;
            case 17:
                return $this->getPositionSlug();
                break;
            case 18:
                return $this->getPositionLabel();
                break;
            case 19:
                return $this->getFeatureComposition();
                break;
            case 20:
                return $this->getFeatureTester();
                break;
            case 21:
                return $this->getIsDefault();
                break;
            default:
                return null;
                break;
        } // switch()
    }