mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-12-26 06:56:45 +01:00
4e0c1af946
- [Draw Text] Improve multiline rendering. - [Draw Text] Add path property.
16 lines
No EOL
251 B
Text
16 lines
No EOL
251 B
Text
enum MOD_NEG {
|
|
_default,
|
|
wrap
|
|
}
|
|
|
|
function safe_mod(numb, modd, _neg = MOD_NEG._default) {
|
|
gml_pragma("forceinline");
|
|
|
|
var _md = modd == 0? 0 : numb % modd;
|
|
if(_md < 0)
|
|
switch(_neg) {
|
|
case MOD_NEG.wrap : _md += modd; break;
|
|
}
|
|
|
|
return _md;
|
|
} |