Feature #2488,
small changes: easier debug, rm 2 useless double numbers (0.5 => 0.5f)