Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Converting two [f32;4] to a uniform is annoying, have a function #58

Open
LexiBigCheese opened this issue Jan 19, 2025 · 0 comments
Open

Comments

@LexiBigCheese
Copy link

fn twovecs_to_uniform(twovecs_bottom: [[f32; 4]; 2]) -> citro3d::uniform::Uniform {
    citro3d::uniform::Uniform::Float2([
        FVec4::from_raw(citro3d_sys::C3D_FVec {
            c: twovecs_bottom[0],
        }),
        FVec4::from_raw(citro3d_sys::C3D_FVec {
            c: twovecs_bottom[1],
        }),
    ])
}

why is the parameter twovecs_bottom?
because when i converted this expression into a function, the variable used was only twovecs_bottom.
there is now twovecs_top as well.

@LexiBigCheese LexiBigCheese changed the title Converting two vecs to a uniform is annoying, have a function Converting two [f32;4] to a uniform is annoying, have a function Jan 19, 2025
@LexiBigCheese LexiBigCheese changed the title Converting two [f32;4] to a uniform is annoying, have a function Converting two [f32;4] to a uniform is annoying, have a function Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant