Name
ceil - returns smallest integer not less than a scalar or each vector component.
Synopsis
float ceil(float a); float1 ceil(float1 a); float2 ceil(float2 a); float3 ceil(float3 a); float4 ceil(float4 a); half ceil(half a); half1 ceil(half1 a); half2 ceil(half2 a); half3 ceil(half3 a); half4 ceil(half4 a); fixed ceil(fixed a); fixed1 ceil(fixed1 a); fixed2 ceil(fixed2 a); fixed3 ceil(fixed3 a); fixed4 ceil(fixed4 a);Parameters
- a
- Vector or scalar of which to determine the ceiling.
Description
Returns the ceiling or smallest integer not less than a scalar or each vector component.
Reference Implementation
ceil for a float scalar could be implemented like this.
float ceil(float v) { return -floor(-v); }Profile Support
ceil is supported in all profiles except fp20.
See Also