Just making tiny improvements to things.
This commit is contained in:
@ -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).
|
||||
|
Reference in New Issue
Block a user