FRACT(3G)
β¨ FRACT(3G) β¨
okay bestie, we're in the 3G manual today and it's giving OpenGL shading language realness π
π NAME π
fract β compute the fractional part of the argument
πΈ DECLARATION πΈ
here's the glow-up, exact as it is, no notes:
genType fract(genType x);
genDType fract(genDType x);
π¦ PARAMETERS π¦
xβ the value you want evaluated. that's it, that's the whole job π«Ά
π DESCRIPTION π
fract hands you back the fractional part of x, calculated like this:
x - floor()(x)
literally just that. the math is mathing π§
π VERSION SUPPORT π
so this is where it gets β¨specificβ¨, bestie. it's all about which OpenGL Shading Language version you're on:
fract (genType) β slay in every single one, no cap:
1.10β β1.20β β1.30β β1.40β β1.50β β3.30β β4.00β β4.10β β4.20β β4.30β β4.40β β4.50β β
fract (genDType) β she arrived fashionably late π:
1.10β -1.20β -1.30β -1.40β -1.50β -3.30β -4.00β β4.10β β4.20β β4.30β β4.40β β4.50β β
π₯ SEE ALSO π₯
floor(), round()
π COPYRIGHT π
Copyright Β© 2011-2014 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.
π COPYRIGHT π
Copyright Β© 2011-2014 Khronos Group
and that's the whole page, bestie!! π the source is marked <code>[FIXME: source]</code> and she was dated <code>01/03/2018</code>, so shoutout to that era of the internet π k bye, go compute some fractional parts, you icon π
π¦ where this page comes from
- ubuntu jammy: opengl-4-man-doc 1.0~svn33624-1 Β· SGI-Free-Software-B-License-2
- ubuntu noble: opengl-4-man-doc 1.0~svn33624-1 Β· SGI-Free-Software-B-License-2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms