Merge pull request #603 from dylanaraps/math2

General: Swap some math to simpler syntax
This commit is contained in:
Dylan Araps 2017-01-08 07:52:34 +11:00 committed by GitHub
commit e5153e054b

View file

@ -1041,7 +1041,7 @@ get_gpu() {
fi
prin "${subtitle}${gpu_num}" "$gpu"
gpu_num="$((gpu_num+=1))"
((++gpu_num))
done
return
@ -1952,7 +1952,7 @@ get_ascii() {
line="${line//\$\{??\}}"
line="${line//\\\\/\\}"
((${#line} > ascii_length)) && ascii_length="${#line}"
lines="$((lines+=1))"
((++lines))
done < "$ascii"
# Colors.
@ -2437,7 +2437,7 @@ prin() {
printf "%b\n" "${text_padding:+\033[${text_padding}C}${zws}${string}${reset} "
# Calculate info height.
info_height="$((info_height+=1))"
((++info_height))
# Log that prin was used.
prin=1
@ -2456,7 +2456,7 @@ get_line_break() {
printf "%s\n" "${zws} "
# Calculate info height.
info_height="$((info_height+=1))"
((++info_height))
# Tell info() that we printed manually.
prin=1