private void refreshFrictionVector(final DefaultUnit unit) {

		double value;

		final Ball ball = unit.getBall();
		final Vector powerOfFriction = unit.getFrictionPower();
		final Vector userPower = getUserPower(unit.getID());
		if (userPower == null || powerOfFriction == null || ball == null) {
			// processing of Exception
		}
		value = Model.kFriction * ball.getMass() * Model.g;
		final Double speedAngle = getInverseAngle(ball.getSpeedVector().getAngle(), 1);
		if (speedAngle == null) {
			powerOfFriction.clear();
			if (userPower.getLength() != 0) {
				double frX = value
						* Math.cos(getInverseAngle(userPower.getAngle(),
								userPower.getLength()));
				double frY = value
						* Math.sin(getInverseAngle(userPower.getAngle(),
								userPower.getLength()));

				if (Math.abs(frX) > Math.abs(-1 * userPower.getProjectionX())) {
					frX = -1 * userPower.getProjectionX();
				}
				if (Math.abs(frY) > Math.abs(-1 * userPower.getProjectionY())) {
					frY = -1 * userPower.getProjectionY();
				}
				powerOfFriction.setProjections(frX, frY);
			}
			return;
		}
		final double cos = Math.cos(speedAngle);
		final double sin = Math.sin(speedAngle);
		powerOfFriction.setProjections(value * cos, value * sin);
	}