From 2882398bae4f84d3ab92686a35f2ce663a9f2e6d Mon Sep 17 00:00:00 2001 From: Recep Aslantas Date: Sun, 5 Feb 2017 15:09:09 +0200 Subject: [PATCH] Update README.md --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/README.md b/README.md index 8adefed..fc81272 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,36 @@ $ [sudo] make install ```text TODO: ``` +##How to use +If you want to use inline versions of funcstions then; include main header +```C +#include +``` +the haeder will include all headers. Then call func you want e.g. rotate vector by axis: +```C +glm_vec_rotate(v1, glm_rad(45), (vec3){1.0f, 0.0f, 0.0f}); +``` +some functions are overloaded :) e.g you can normalize vector: +```C +glm_vec_normalize(vec); +``` +this will normalize vec and store normalized vector into `vec` but if you will store normalized vector into another vector do this: +```C +glm_vec_normalize_to(vec, result); +``` +like this fuction you may see `_to` postfix, this functions store results to another variables and save temp memory + +to call pre-compiled versions include header with `c` postfix, c means call. Pre-compiled versions are just wrappers. +```C +#include +``` +this header will include all heaers with c postfix. You need to call functions with c posfix: +```C +glm_vec_normalize(vec); +``` + +Fuction usage and parameters are documented inside related headers. ##Notes - This library uses float types only, does not support Integers, Double... yet