Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scalar multiply/divide #19

Open
livtanong opened this issue May 23, 2015 · 4 comments
Open

Scalar multiply/divide #19

livtanong opened this issue May 23, 2015 · 4 comments

Comments

@livtanong
Copy link

I know you can just v.multiply(new Victor(n, n)) where n is the scalar you want, but this is kind of a hack, and a dedicated scalar multiplication method would be wonderful.

@yukulele
Copy link

yukulele commented Jun 7, 2015

👍

@mfandl
Copy link

mfandl commented Sep 12, 2015

multiplyScalar and divideScalar are there in 1.1.0 - not yet mentioned in the documentation

@limikael
Copy link

limikael commented Dec 8, 2019

4 years later... Any idea when it might make it to the documentation? Anything a karmatic netizen like myself can help out with to get the documentation updated?

@rmkane
Copy link

rmkane commented Oct 4, 2022

As @mfandl mentioned, the methods were added PR #16 prior to release 1.0.0, but are not mentioned in the docs.

Victor.prototype.addScalar(scalar)
Victor.prototype.addScalarX(scalar)
Victor.prototype.addScalarY(scalar)

Victor.prototype.divideScalar(scalar)
Victor.prototype.divideScalarX(scalar)
Victor.prototype.divideScalarY(scalar)

Victor.prototype.multiplyScalar(scalar)
Victor.prototype.multiplyScalarX(scalar)
Victor.prototype.multiplyScalarY(scalar)

Victor.prototype.subtractScalar(scalar)
Victor.prototype.subtractScalarX(scalar)
Victor.prototype.subtractScalarY(scalar)

The website's docs haven't been updated since 30 October 2014 (2014-10-30T19:49:34).

This predates critical changes:

The docs should have been rebuilt after the 1.1.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants