Why not work 'range' in expressions?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Tort
	var test = 1.0
	if test in range(0.9, 1.1):
		print(1111)

not print

:bust_in_silhouette: Reply From: hilfazer

I did this

print ( range(0.9, 1.1) )

and it returned [0]. I don’t think range can work with floating point numbers. When you do this:

if test in range(0.9, 1.1, 0.1):

Godot will complain that step can’t be zero (0.1 was truncated to 0).