1
Fork 0

javascript(ultra32): added rotate

Signed-off-by: prescientmoon <git@moonythm.dev>
This commit is contained in:
Matei Adriel 2019-01-20 14:36:47 +02:00 committed by prescientmoon
parent edd15321fa
commit 2ecbd6d4b4
Signed by: prescientmoon
SSH key fingerprint: SHA256:UUF9JT2s8Xfyv76b8ZuVL7XrmimH4o49p4b+iexbVH4
2 changed files with 10 additions and 61 deletions

View file

@ -1,61 +1,3 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# TypeScript v1 declaration files
typings/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
# next.js build output
.next
node_modules
app.ts
tsconfig.json

View file

@ -35,3 +35,10 @@ function mirror(vector) {
return vector;
}
exports.mirror = mirror;
function rotate(vector) {
const oldx = vector[0];
vector[0] = Math.cos(vector[0]) - Math.sin(vector[1]);
vector[1] = Math.sin(oldx) + Math.cos(vector[1]);
return vector;
}
exports.rotate = rotate;