mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-04-23 20:53:39 +00:00
13 lines
289 B
C++
13 lines
289 B
C++
#include "../Platform/stdafx.h"
|
|
#include "Rotate.h"
|
|
|
|
Rotate::Rotate(Synth* synth, float angle) {
|
|
this->synth = synth;
|
|
|
|
_sin = sin(angle);
|
|
_cos = cos(angle);
|
|
}
|
|
|
|
double Rotate::getValue(double x, double y) {
|
|
return synth->getValue(x * _cos + y * _sin, y * _cos - x * _sin);
|
|
} |