unified the singular/plural forms
This commit is contained in:
parent
492438da42
commit
edb0e29f8a
|
|
@ -10,7 +10,7 @@ vec4 ceil(vec4 x)
|
|||
```
|
||||
|
||||
### Parameters
|
||||
```x``` specify the value to evaluate.
|
||||
```x``` specifies the value to evaluate.
|
||||
|
||||
### Description
|
||||
```ceil()``` returns a value equal to the nearest integer that is greater than or equal to ```x```.
|
||||
|
|
|
|||
|
|
@ -14,11 +14,11 @@ vec4 clamp(vec4 x, float minVal, float maxVal)
|
|||
```
|
||||
|
||||
### Parameters
|
||||
```x``` specify the value to constrain.
|
||||
```x``` specifies the value to constrain.
|
||||
|
||||
```minVal``` specify the lower end of the range into which to constrain x.
|
||||
```minVal``` specifies the lower end of the range into which to constrain x.
|
||||
|
||||
```maxVal``` specify the upper end of the range into which to constrain x.
|
||||
```maxVal``` specifies the upper end of the range into which to constrain x.
|
||||
|
||||
### Description
|
||||
```clamp()``` returns the value of ```x``` constrained to the range ```minVal``` to ```maxVal```. The returned value is computed as ```min(max(x, minVal), maxVal)```.
|
||||
|
|
|
|||
|
|
@ -1,21 +0,0 @@
|
|||
## cos
|
||||
Повертає косинус параметра
|
||||
|
||||
### Оголошення
|
||||
```glsl
|
||||
float cos(float angle)
|
||||
vec2 cos(vec2 angle)
|
||||
vec3 cos(vec3 angle)
|
||||
vec4 cos(vec4 angle)
|
||||
```
|
||||
|
||||
### Параметри
|
||||
**```angle```** — величина в радіанах, косинус якої потрібно повернути.
|
||||
|
||||
### Опис
|
||||
**```cos()```** повертає тригонометричний косинус кута.
|
||||
|
||||
<div class="simpleFunction" data="y = cos(x);"></div>
|
||||
|
||||
### Дивіться також
|
||||
[acos](/glossary/?lan=ua&search=acos), [sin](/glossary/?lan=ua&search=sin), [asin](/glossary/?lan=ua&search=asin), [tan](/glossary/?lan=ua&search=tan), [atan](/glossary/?lan=ua&search=atan), [Розділ 05: Формотворчі функції](/05/?lan=ua)
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
## Cos
|
||||
Tính hàm cosine của 1 góc lượng giác
|
||||
|
||||
### Các phiên bản
|
||||
```glsl
|
||||
float cos(float angle)
|
||||
vec2 cos(vec2 angle)
|
||||
vec3 cos(vec3 angle)
|
||||
vec4 cos(vec4 angle)
|
||||
```
|
||||
|
||||
### Các tham số
|
||||
```angle``` góc lượng giác (đơn vị radian) cần tính cosine
|
||||
|
||||
### Mô tả
|
||||
```cos()``` trả về giá trị cosine tương ứng với góc ```angle```
|
||||
|
||||
<div class="simpleFunction" data="y = cos(x); "></div>
|
||||
|
||||
### Tham khảo thêm
|
||||
[acos](/glossary/?lan=vi&search=acos), [sin](/glossary/?lan=vi&search=sin), [asin](/glossary/?lan=vi&search=asin), [tan](/glossary/?lan=vi&search=tan), [atan](/glossary/?lan=vi&search=atan), [Các hàm số cơ bản (Hàm hình dạng - Shape function)](/05/?lan=vi)
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
## Cos
|
||||
Return the cosine of the parameter
|
||||
|
||||
### Declaration
|
||||
```glsl
|
||||
float cos(float angle)
|
||||
vec2 cos(vec2 angle)
|
||||
vec3 cos(vec3 angle)
|
||||
vec4 cos(vec4 angle)
|
||||
```
|
||||
|
||||
### Parameters
|
||||
```angle``` specify the quantity, in radians, of which to return the cosine.
|
||||
|
||||
### Description
|
||||
```cos()``` returns the trigonometric cosine of angle.
|
||||
|
||||
<div class="simpleFunction" data="y = cos(x); "></div>
|
||||
|
||||
### See Also
|
||||
[acos](/glossary/?search=acos), [sin](/glossary/?search=sin), [asin](/glossary/?search=asin), [tan](/glossary/?search=tan), [atan](/glossary/?search=atan), [Chapter 05: Shaping Functions](/05/)
|
||||
|
|
@ -10,7 +10,7 @@ vec4 degrees(vec4 radians)
|
|||
```
|
||||
|
||||
### Parameters
|
||||
```radians``` specify the quantity, in radians, to be converted to degrees.
|
||||
```radians``` specifies the quantity, in radians, to be converted to degrees.
|
||||
|
||||
### Description
|
||||
```degrees()``` converts a quantity, specified in radians into degrees. That is, the return value is ```(180.0*radians)/PI```
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@ bvec4 equal(ivec4 x, ivec4 y)
|
|||
```
|
||||
|
||||
### Parameters
|
||||
```x``` Specifies the first vector to be used in the comparison operation.
|
||||
```x``` specifies the first vector to be used in the comparison operation.
|
||||
|
||||
```y``` Specifies the second vector to be used in the comparison operation.
|
||||
```y``` specifies the second vector to be used in the comparison operation.
|
||||
|
||||
### Description
|
||||
```equal()``` returns a boolean vector in which each element ```i``` is computed as ```x[i] == y[i]```.
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ vec4 exp(vec4 x)
|
|||
```
|
||||
|
||||
### Parameters
|
||||
```x``` specify the value to exponentiate.
|
||||
```x``` specifies the value to exponentiate.
|
||||
|
||||
### Description
|
||||
```exp()``` returns the natural exponentiation of ```x```.
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ vec4 exp2(vec4 x)
|
|||
```
|
||||
|
||||
### Parameters
|
||||
```x``` specify the value of the power to which 2 will be raised.
|
||||
```x``` specifies the value of the power to which 2 will be raised.
|
||||
|
||||
### Description
|
||||
```exp2()``` returns 2 raised to the power of ```x```.
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ vec4 floor(vec4 x)
|
|||
```
|
||||
|
||||
### Parameters
|
||||
```x``` specify the value to evaluate.
|
||||
```x``` specifies the value to evaluate.
|
||||
|
||||
### Description
|
||||
```floor()``` returns a value equal to the nearest integer that is less than or equal to ```x```.
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ vec4 fract(vec4 x)
|
|||
```
|
||||
|
||||
### Parameters
|
||||
```x``` specify the value to evaluate.
|
||||
```x``` specifies the value to evaluate.
|
||||
|
||||
### Description
|
||||
```fract()``` returns the fractional part of ```x```. This is calculated as ```x - floor(x)```.
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ vec4 inversesqrt(vec4 x)
|
|||
```
|
||||
|
||||
### Parameters
|
||||
```x``` specify the value of which to take the inverse of the square root.
|
||||
```x``` specifies the value of which to take the inverse of the square root.
|
||||
|
||||
### Description
|
||||
```inversesqrt()``` returns the inverse of the square root of ```x```.
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ vec4 log(vec4 x)
|
|||
```
|
||||
|
||||
### Parameters
|
||||
```x``` specify the value of which to take the natural logarithm.
|
||||
```x``` specifies the value of which to take the natural logarithm.
|
||||
|
||||
### Description
|
||||
```log()``` returns the natural logarithm of ```x```.
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ vec4 log2(vec4 x)
|
|||
```
|
||||
|
||||
### Parameters
|
||||
```x``` specify the value of which to take the base 2 logarithm.
|
||||
```x``` specifies the value of which to take the base 2 logarithm.
|
||||
|
||||
### Description
|
||||
```log2()``` returns the base 2 logarithm of ```x```.
|
||||
|
|
|
|||
|
|
@ -14,9 +14,9 @@ vec4 max(vec4 x, float y)
|
|||
```
|
||||
|
||||
### Parameters
|
||||
```x``` specify the first value to compare.
|
||||
```x``` specifies the first value to compare.
|
||||
|
||||
```y``` specify the second value to compare.
|
||||
```y``` specifies the second value to compare.
|
||||
|
||||
### Description
|
||||
```max()``` returns the maximum of the two parameters. It returns ```y``` if ```y``` is greater than ```x```, otherwise it returns ```x```.
|
||||
|
|
|
|||
|
|
@ -14,9 +14,9 @@ vec4 min(vec4 x, float y)
|
|||
```
|
||||
|
||||
### Parameters
|
||||
```x``` specify the first value to compare.
|
||||
```x``` specifies the first value to compare.
|
||||
|
||||
```y``` specify the second value to compare.
|
||||
```y``` specifies the second value to compare.
|
||||
|
||||
### Description
|
||||
```min()``` returns the minimum of the two parameters. It returns ```y``` if ```y``` is less than ```x```, otherwise it returns ```x```.
|
||||
|
|
|
|||
|
|
@ -14,11 +14,11 @@ vec4 mix(vec4 x, vec4 y, float a)
|
|||
```
|
||||
|
||||
### Parameters
|
||||
```x``` Specify the start of the range in which to interpolate.
|
||||
```x``` specifies the start of the range in which to interpolate.
|
||||
|
||||
```y``` Specify the end of the range in which to interpolate.
|
||||
```y``` specifies the end of the range in which to interpolate.
|
||||
|
||||
```a``` Specify the value to use to interpolate between x and y.
|
||||
```a``` specifies the value to use to interpolate between x and y.
|
||||
|
||||
### Description
|
||||
```mix()``` performs a linear interpolation between ```x``` and ```y``` using ```a``` to weight between them. The return value is computed as ```x×(1−a)+y×a```.
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ vec4 mod(vec4 x, float y)
|
|||
```
|
||||
|
||||
### Parameters
|
||||
```x``` specify the value to evaluate.
|
||||
```y``` specify the value to obtain the modulo of.
|
||||
```x``` specifies the value to evaluate.
|
||||
```y``` specifies the value to obtain the modulo of.
|
||||
|
||||
### Description
|
||||
```mod()``` returns the value of ```x``` modulo ```y```. This is computed as ```x - y * floor(x/y)```.
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@ vec4 pow(vec4 x, vec4 y)
|
|||
```
|
||||
|
||||
### Parameters
|
||||
```x``` specify the value to raise to the power ```y```.
|
||||
```x``` specifies the value to raise to the power ```y```.
|
||||
|
||||
```y``` specify the power to which to raise ```x```.
|
||||
```y``` specifies the power to which to raise ```x```.
|
||||
|
||||
### Description
|
||||
```pow()``` returns the value of ```x``` raised to the ```y``` power.
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ vec4 radians(vec4 degrees)
|
|||
```
|
||||
|
||||
### Parameters
|
||||
```degrees``` specify the quantity, in degrees, to be converted to radians.
|
||||
```degrees``` specifies the quantity, in degrees, to be converted to radians.
|
||||
|
||||
### Description
|
||||
```radians()``` converts a quantity, specified in degrees into radians. That is, the return value is ```(PI * degrees)/180```.
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ vec4 sign(vec4 x)
|
|||
```
|
||||
|
||||
### Parameters
|
||||
```x``` specify the value from which to extract the sign.
|
||||
```x``` specifies the value from which to extract the sign.
|
||||
|
||||
### Description
|
||||
```sign()``` returns -1.0 if x is less than 0.0, 0.0 if x is equal to 0.0, and +1.0 if x is greater than 0.0.
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ vec4 sqrt(vec4 x)
|
|||
```
|
||||
|
||||
### Parameters
|
||||
```x``` specify the value of which to take the square root.
|
||||
```x``` specifies the value of which to take the square root.
|
||||
|
||||
### Description
|
||||
```sqrt()``` returns the square root of ```x```.
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ vec4 step(float edge, vec4 x)
|
|||
### Parameters
|
||||
```edge``` specifies the location of the edge of the step function.
|
||||
|
||||
```x``` specify the value to be used to generate the step function.
|
||||
```x``` specifies the value to be used to generate the step function.
|
||||
|
||||
### Description
|
||||
```step()``` generates a step function by comparing ```x``` to ```edge```.
|
||||
|
|
|
|||
|
|
@ -17,4 +17,4 @@ newMaterial = matStruct(vec4(0.1, 0.1, 0.1, 1.0),
|
|||
```
|
||||
|
||||
### Description
|
||||
```struct``` declare a custom data structures based on standard types. A constructor for the structure with the same name is created automatically. The declaration of a variable (in this case "newMaterial") is optional.
|
||||
```struct``` declares a custom data structure based on standard types. A constructor for the structure with the same name is created automatically. The declaration of a variable (in this case "newMaterial") is optional.
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ vec4 tan(vec4 angle)
|
|||
```
|
||||
|
||||
### Parameters
|
||||
```angle``` specify the quantity, in radians, of which to return the tangent.
|
||||
```angle``` specifies the quantity, in radians, of which to return the tangent.
|
||||
|
||||
### Description
|
||||
```tan()``` returns the trigonometric tangent of angle.
|
||||
|
|
|
|||
Loading…
Reference in New Issue