mirror of
https://github.com/italicsjenga/agb.git
synced 2025-01-11 09:31:34 +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
|
// Identity for rotation / scale / skew
|
||||||
/// Generates the matrix that represents a translation by the position
|
/// Generates the matrix that represents a translation by the position
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn from_position(position: Vector2D<Num<i32, 8>>) -> Self {
|
pub fn from_translation(position: Vector2D<Num<i32, 8>>) -> Self {
|
||||||
AffineMatrix {
|
AffineMatrix {
|
||||||
a: 1.into(),
|
a: 1.into(),
|
||||||
b: 0.into(),
|
b: 0.into(),
|
||||||
|
@ -209,7 +209,7 @@ mod tests {
|
||||||
fn test_simple_multiply(_: &mut crate::Gba) {
|
fn test_simple_multiply(_: &mut crate::Gba) {
|
||||||
let position = (20, 10).into();
|
let position = (20, 10).into();
|
||||||
|
|
||||||
let a = AffineMatrix::from_position(position);
|
let a = AffineMatrix::from_translation(position);
|
||||||
let b = AffineMatrix::default();
|
let b = AffineMatrix::default();
|
||||||
|
|
||||||
let c = a * b;
|
let c = a * b;
|
||||||
|
|
Loading…
Reference in a new issue