fixed float cast in cubic bezier