295 } |
303 } |
296 |
304 |
297 // -------------------------------------------------------------------------- |
305 // -------------------------------------------------------------------------- |
298 // Vector Functions |
306 // Vector Functions |
299 // -------------------------------------------------------------------------- |
307 // -------------------------------------------------------------------------- |
|
308 |
|
309 static inline asc_vec2i asc_vec2_ftoi(asc_vec2f v) { |
|
310 return ASC_VEC2I(v.x, v.y); |
|
311 } |
|
312 |
|
313 static inline asc_vec2f asc_vec2_itof(asc_vec2i v) { |
|
314 return ASC_VEC2F(v.x, v.y); |
|
315 } |
|
316 |
|
317 static inline asc_vec2u asc_vec2_ftou(asc_vec2f v) { |
|
318 return ASC_VEC2U(v.x, v.y); |
|
319 } |
|
320 |
|
321 static inline asc_vec2f asc_vec2_utof(asc_vec2u v) { |
|
322 return ASC_VEC2F(v.x, v.y); |
|
323 } |
300 |
324 |
301 static inline asc_vec2f asc_vec2f_scale(asc_vec2f v, float s) { |
325 static inline asc_vec2f asc_vec2f_scale(asc_vec2f v, float s) { |
302 return ASC_VEC2F(v.x*s, v.y*s); |
326 return ASC_VEC2F(v.x*s, v.y*s); |
303 } |
327 } |
304 |
328 |