8000 GitHub - ziglibs/zlm: Zig linear mathemathics · GitHub
[go: up one dir, main page]

Skip to content
{"props":{"color_mode":"dark","logged_in":false,"marketing_page":false,"home_path":"/","login_path":"/login?return_to=https%3A%2F%2FGitHub.com%2Fziglibs%2Fzlm","signup_path":"/signup?ref_cta=Sign+up\u0026ref_loc=header+logged+out\u0026ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E\u0026source=header-repo\u0026source_repo=ziglibs%2Fzlm","signup_enabled":true,"is_signup_controller":false,"show_search_and_nav":true,"hide_search":false,"private_mode_enabled":false,"should_use_dotcom_links":true,"auth_hydro_click":"{\"event_type\":\"authentication.click\",\"payload\":{\"location_in_page\":\"site header menu\",\"repository_id\":null,\"auth_type\":\"SIGN_UP\",\"originating_url\":\"https://GitHub.com/ziglibs/zlm\",\"user_id\":null}}","auth_hydro_click_hmac":"0e4b089e95d3028e74576504fe89c7fc58cf5bcf998748978a8ddbacc6773285"}}
ziglibsPublic

Latest commit

 

History

63 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zlm

Zig linear mathemathics library.

Current provides the following types:

  • Vec2
  • Vec3
  • Vec4
  • Mat2
  • Mat3
  • Mat4

The library is currently built around the OpenGL coordinate system and is fully generic on the basic data type.

Example

// using `as(f32)` to specify precision of fields
const math = @import("zlm").as(f32);

/// Accelerate the given velocity `v` by `a` over `t`.
fn accelerate(v: math.Vec3, a: math.Vec3, t: f32) math.Vec3 {
  return v.add(a.scale(t));
}

Releases

Sponsor this project

Packages

Contributors

Languages

0