## Fract Tách phần thập phân của số thực. ### Các phiên bản ```glsl float fract(float x) vec2 fract(vec2 x) vec3 fract(vec3 x) vec4 fract(vec4 x) ``` ### Các tham số ```x``` số thực cần tách phần thập phân. ### Mô tả ```fract()``` trả về phần thập phân của ```x``` theo công thức ```x - floor(x)```.
### Tham khảo thêm [floor](/glossary/?lan=vi&search=floor), [ceil](/glossary/?lan=vi&search=ceil), [mod](/glossary/?lan=vi&search=mod), [Các hàm số cơ bản (Hàm hình dạng - Shape function)](/05/?lan=vi)