maxkueng/victor — pull request #1 by maxkueng (2014-03-31 21:18:44+00:00)
Title: Ditch static functions that can be achieved with regular methods and `copy()`?

@supercrabtree

Some static functions can easily be achieved by using the regular methods. My suggestion is to ditch them, or to implement each instance method also as a static function.

Here are some examples:

```javascript
// static:
var vec = Victor.add(new Victor(20, 30), new Victor(40, 50));

// equivalent:
var vec = Victor(20, 30).copy().add(new Victor(40, 50));
```

```javascript
// static:
var vec = Victor.divide(new Victor(20, 30), 2);

// equivalent:
var vec = Victor(20, 30).copy().divide(2);
```

In case we want to provide static functions, I suggest to do them as follows instead of duplicate implementation:

```javascript
// before:
Victor.add = function (vecA, vecB) {
return new Victor(vecA.x + vecB.x, vecA.y + vecB.y);
};

// after:
Victor.add = function (vecA, vecB) {
return vecA.copy().add(vecB);
};
```