Page 1 of 1
Function to get current font size (needed it)
Posted: Mon Apr 07, 2014 11:02 am
by Henko
def font_size = (text_width("0123456789")-1)/6
Re: Function to get current font size (needed it)
Posted: Sat Apr 12, 2014 4:39 pm
by Mr. Kibernetik
Very smart function!
Next release will have such function built-in.
It was interesting to compare speed of this user function wih built-in function.
User function performs 100000 times in 1.727 seconds.
Built-in function in 0.269 seconds.
Re: Function to get current font size (needed it)
Posted: Sat Apr 12, 2014 9:06 pm
by Dr zayus
Yes, there's excellent performance in Smart Basic. Great accuracy on sprite collisions also.
Re: Function to get current font size (needed it)
Posted: Sat Apr 12, 2014 9:24 pm
by Mr. Kibernetik
Dr zayus wrote:Yes, there's excellent performance in Smart Basic. Great accuracy on sprite collisions also.
Nice to hear that!