From 85d20c4f4cf3656fbf7c27b6b8bbf9536e3ae04d Mon Sep 17 00:00:00 2001 From: metamuffin Date: Wed, 7 Dec 2022 17:16:40 +0100 Subject: refactor, matrix math --- evc/src/block.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'evc/src/block.rs') diff --git a/evc/src/block.rs b/evc/src/block.rs index 929793d..dd23207 100644 --- a/evc/src/block.rs +++ b/evc/src/block.rs @@ -3,14 +3,14 @@ use anyhow::bail; use crate::{ pixel::Pixel, ser::{Ser, Sink, Source}, - vec2::{Small, Vec2}, + helpers::vector::{Small, Vec2}, }; #[derive(Clone, Debug)] pub enum Block { Literal(Vec), Split(Box<[Block; 2]>), - Reference { translation: Vec2 }, + Reference { translation: Vec2 }, } impl Block { @@ -33,7 +33,7 @@ impl Block { Ok(()) } - pub fn read(source: &mut impl std::io::Read, size: Vec2) -> anyhow::Result { + pub fn read(source: &mut impl std::io::Read, size: Vec2) -> anyhow::Result { Ok(match source.get::()? { 0 => Block::Literal(source.get()?), 1 => Block::Split(Box::new({ @@ -54,7 +54,7 @@ impl Block { [a, b] })), 2 => Block::Reference { - translation: source.get::>()?.0, + translation: source.get::>>()?.0, }, x => bail!("corrupt block type ({})", x), }) -- cgit v1.2.3-70-g09d2