## Normal

This function transforms a normal from one space to another. It will give the same results as Transform::Vector except the resulting vector will be normalized.

### Syntax

• Vec3 Normal(Vec3 normal, Entity src, Entity dst)
• Vec3 Normal(number x, number y, number z, Entity src, Entity dst)
• Vec3 Normal(Vec3 normal, Mat4 src, Mat4 dst)
• Vec3 Normal(number x, number y, number z, Mat4 src, Mat4 dst)

### Parameters

• normal: the normal to be transformed.
• x: the X component of the normal to be transformed.
• y: the Y component of the normal to be transformed.
• z: the Z component of the normal to be transformed.
• src: the source entity or 4x4 matrix to transform the normal from.
• dst: the destination entity or 4x4 matrix to transform the normal to.

### Returns

Returns the transformed normal.

### Example

`--Create a windowwindow = Window:Create()context = Context:Create(window)world = World:Create()local camera = Camera:Create() camera:Move(0,0,-3) local light = DirectionalLight:Create() light:SetRotation(35,35,0)         --Create a modelmodel = Model:Box() model:SetColor(0.0,0.0,1.0) model:SetRotation(0,180,0) model:SetScale(2) while true do                if window:Closed() or window:KeyHit(Key.Escape) then return false end        Time:Update()        world:Update()        world:Render()        --We're going to transform the normal (1,0,0) from global space to the model's local space        --Because the model is rotated to (0,180,0) and scaled to (2,2,2) the normal will be at (-1,0,0) in local space (relative to the model).        local v = Transform:Normal(1,0,0,nil,model)         context:SetBlendMode(Blend.Alpha)         context:DrawText(v:ToString(),2,2)         context:SetBlendMode(Blend.Solid)         context:Sync()end`