Moving a Game Object to X,Y position with z rotation.

I am passing 3 float values from another script to a script attached to the game object I want to move. The values are X position, Y position, and Z rotation. The rotation is constrained from -45 to 45. This script below seems to be working but I was wondering if there was a better way to accomplish this?

function Update () {

    transform.position = new Vector3(gui.hLightSliderValue, gui.vFLightVert, 0);
    transform.eulerAngles = Vector3(0,0,gui.hFLightAngle-90);
}

Not much. You can alternatively set the rotation by creating a quaternion but I don't think it offer any benefits really. It probably calls upon that method anyhows.

What is "a better way" to you? Cleaner code? Faster code? Should it work with rigidbodies? Do you want to be able to "plug" into "any" value source to decouple it from the gui sliders? What makes code better in your case? I don't know :)