vector2ByAngle static method
Implementation
static Vector2 vector2ByAngle(double angle, {double intensity = 1}) {
var x = cos(angle) * intensity;
var y = sin(angle) * intensity;
if (x.abs() < 0.01) {
x = 0;
}
if (y.abs() < 0.01) {
y = 0;
}
return Vector2(x, y);
}