Skip to content

Commit f6143bd

Browse files
committed
A few cosmetic corrections.
1 parent d3de11a commit f6143bd

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ msvc15 and linux amd64).
3131

3232
raylibpy will look for the respective binary in 3 locations:
3333
* In the `RAYLIB_BIN_PATH` environment variable;
34-
* in the directory where the `__main__` module is located, and
34+
* in the directory where the `"__main__"` module is located, and
3535
* in the raylibpy package directory.
3636

37-
`RAYLIB_LIB_PATH` accepts as value: `__main__`, as the entry point module directory;
38-
`__file__` as the package directory or another specific directory.
37+
`RAYLIB_LIB_PATH` accepts as value: `"__main__"`, as the entry point module directory;
38+
`"__file__"` as the package directory or another specific directory.
3939

4040
if `RAYLIB_BIN_PATH` is not set, it will look in the package directory first,
41-
then in the `__main__` module location. Note though that `__main__` refers the module selected to
41+
then in the `__main__` module location. Note though that `"__main__"` refers the module selected to
4242
start the Python interpreter, not the `__main__.py` file, although it might be the case.
4343

4444
The binaries made available by raylib are all OpenGL 3.3. For OpenGL 1.1 or 2.1,
@@ -91,10 +91,10 @@ number of components:
9191
```python
9292
vec_a = Vector3(3., 5., 7.)
9393
vec_b = Vector3(4., 2., 0.)
94-
vec_a * vec_b # outputs (12.0, 10.0, 0.0)
95-
vec_a + (8, 100, -1) # outputs (11.0, 105.0, 6.0)
96-
vec_a %= 2 # augmented assignment (modulo)
97-
vec_a # outputs (1.0, 1.0, 0.0)
94+
vec_a * vec_b # outputs (12.0, 10.0, 0.0)
95+
vec_a + (8, 100, -1) # outputs (11.0, 105.0, 6.0)
96+
vec_a %= 2 # augmented assignment (modulo)
97+
vec_a # outputs (1.0, 1.0, 0.0)
9898
```
9999

100100
Vectors also support GLSL vector swizzling. Also, `x`, `y`, `z` and `w` coordinates maps to
@@ -104,21 +104,21 @@ texture coordinates (`u` and `v`):
104104
```python
105105
# Reading (__getattr__)
106106
vec3 = Vector3(123.0, 467.0, 789.0)
107-
vec2 = vec3.uv # x and y respectively as u and v
108-
vec3 = vec3.bgr # x, y and z respectively as r, g and b ( rgb is not available in Vector 2)
107+
vec2 = vec3.uv # x and y respectively as u and v
108+
vec3 = vec3.bgr # x, y and z respectively as r, g and b ( rgb is not available in Vector 2)
109109
vec4 = vec2.rrrg # for attribute reading, is ok to repeat components
110110

111111

112112
# Writing (__setattr__)
113113
vec3 = Vector3(123.0, 467.0, 789.0)
114-
vec4.yxwz = 10, 0, -1, vec3.z # sequences of ints and/or floats are accepted as value
114+
vec4.yxwz = 10, 0, -1, vec3.z # sequences of ints and/or floats are accepted as value
115115
vec2.vu = vec3.xy # x and y respectively as u and v
116-
vec3.bgr = 12, vec4.x # x, y and z respectively as r, g and b ( rgb is not available in Vector 2)
116+
vec3.bgr = 12, vec4.x # x, y and z respectively as r, g and b ( rgb is not available in Vector 2)
117117

118118
# the following raises an exception:
119-
vec3.rrr = vec4.yxw # for attribute writing, is _not_ ok to repeat components
120-
vec2.br = vec4.uv # r, g and b is not available in Vector2
121-
vec4.brxy = (0., 0., vec2.x, vec3.z) # can't mix component name groups (rgba, xywz and uv)
119+
vec3.rrr = vec4.yxw # for attribute writing, is _not_ ok to repeat components
120+
vec2.br = vec4.uv # r, g and b is not available in Vector2
121+
vec4.brxy = (0., 0., vec2.x, vec3.z) # can't mix component name groups (rgba, xywz and uv)
122122
```
123123

124124
Constructors and swizzled attributes now accept any combination of numbers,
@@ -127,11 +127,11 @@ vectors and sequences, as long as the total number of arguments are preserved:
127127
# all these results in the same Vector4
128128
a = Vector4(3, 4, 5, 6)
129129
b = Vector4(a.xy, 5, 6)
130-
c = Vector4(b.x, b.yz, b.w)
131-
d = Vector4(c.x, c.y, c.zw)
132-
e = Vector4(d.xy, d.zw)
130+
c = Vector4(b.x, b.yz, 6)
131+
d = Vector4(3, c.y, c.zw)
132+
e = Vector4(d.xy, (5, 6))
133133
f = Vector4(e.xyz, 6)
134-
g = Vector4(f.x, f.yzw)
134+
g = Vector4(3, f.yzw)
135135
h = Vector4(g)
136136
```
137137

0 commit comments

Comments
 (0)