mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 16:21:33 +11:00
change name of function to match the name of the transformation
This commit is contained in:
parent
a41e85302a
commit
9ed5ee2295
|
@ -84,7 +84,7 @@ impl AffineMatrix {
|
|||
// Identity for rotation / scale / skew
|
||||
/// Generates the matrix that represents a translation by the position
|
||||
#[must_use]
|
||||
pub fn from_position(position: Vector2D<Num<i32, 8>>) -> Self {
|
||||
pub fn from_translation(position: Vector2D<Num<i32, 8>>) -> Self {
|
||||
AffineMatrix {
|
||||
a: 1.into(),
|
||||
b: 0.into(),
|
||||
|
@ -209,7 +209,7 @@ mod tests {
|
|||
fn test_simple_multiply(_: &mut crate::Gba) {
|
||||
let position = (20, 10).into();
|
||||
|
||||
let a = AffineMatrix::from_position(position);
|
||||
let a = AffineMatrix::from_translation(position);
|
||||
let b = AffineMatrix::default();
|
||||
|
||||
let c = a * b;
|
||||
|
|
Loading…
Reference in a new issue