Just making tiny improvements to things.

This commit is contained in:
2023-01-07 14:35:54 -08:00
parent d6b7895cab
commit 19f688afe1
33 changed files with 312 additions and 153 deletions

View File

@ -96,6 +96,19 @@ namespace Dawn {
}
}
float_t getAxis(inputbind_t negative, inputbind_t positive) {
return -getValue(negative) + getValue(positive);
}
glm::vec2 getAxis2D(
inputbind_t negativeX,
inputbind_t positiveX,
inputbind_t negativeY,
inputbind_t positiveY
) {
return glm::vec2(getAxis(negativeX, positiveX), getAxis(negativeY, positiveY));
}
/**
* Returns true if the given bind is currently being pressed (a non-zero
* value).