mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
ui: cleanup warnings from glm module
This commit is contained in:
parent
6b706a0c99
commit
d90a291c5e
@ -131,7 +131,7 @@ fn rotate(m Mat4, angle f32, vec Vec3) Mat4 {
|
||||
*/
|
||||
|
||||
fn f32_calloc(n int) &f32 {
|
||||
return *f32(calloc(n * sizeof(f32)))
|
||||
return &f32(calloc(n * sizeof(f32)))
|
||||
}
|
||||
// fn translate(vec Vec3) *f32 {
|
||||
pub fn translate(m Mat4, v Vec3) Mat4 {
|
||||
@ -277,7 +277,8 @@ fn ortho_js(left, right, bottom, top f32) &f32 {
|
||||
lr := 1.0 / (left - right)
|
||||
bt := 1.0 / (bottom - top)
|
||||
nf := 1.0 / 1.0// (mynear -myfar)
|
||||
mut out := (*f32)( malloc (sizeof(f32) * 16))
|
||||
mut out := &f32(0)
|
||||
unsafe { out = &f32( malloc (sizeof(f32) * 16)) }
|
||||
out[0] = -2.0 * lr
|
||||
out[1] = 0
|
||||
out[2] = 0
|
||||
|
Loading…
Reference in New Issue
Block a user