package net.glowstone.util;

import org.bukkit.Location;
import org.bukkit.util.Vector;

public class RayUtil {

    public static Vector getVelocityRay(Vector ray) {
        Vector velocityRay = ray.clone();
        if (velocityRay.lengthSquared() == 0) {
            velocityRay.setX(0);
            velocityRay.setY(1);
            velocityRay.setZ(0);
        } else {
            velocityRay.normalize();
        }

        return velocityRay;
    }

    public static float getExposure(Location target, Location... sources) {
        return 1;
    }

    public static Vector getRayBetween(Location target, Location source) {
        return target.clone().subtract(source).toVector();
    }
}

@@ -106,16 +106,194 @@
 Util %7B%0A%0A
+    /**%0A     * Maps %7B0, 0, 0%7D to %7B0, 1, 0%7D and all other vectors to their normalized form.%0A     *%0A     * @param ray the ray to transform%0A     * @return a ray of length 1%0A     */%0A
     publ

Fix CheckStyle issues in util/RayUtil.java (#729)