MCPcopy
hub / github.com/EngoEngine/engo / Scale

Method Scale

math.go:222–236  ·  view source on GitHub ↗

Scale scales m by x and y.

(x, y float32)

Source from the content-addressed store, hash-verified

220
221// Scale scales m by x and y.
222func (m *Matrix) Scale(x, y float32) *Matrix {
223 m.tmp[m00] = x
224 m.tmp[m10] = 0
225 m.tmp[m20] = 0
226
227 m.tmp[m01] = 0
228 m.tmp[m11] = y
229 m.tmp[m21] = 0
230
231 m.tmp[m02] = 0
232 m.tmp[m12] = 0
233 m.tmp[m22] = 1
234 multiplyMatricies(m.Val[:], m.tmp[:])
235 return m
236}
237
238// ScaleComponent returns the current scale component of m.
239// This assumes uniform scaling.

Callers 5

TestMatrixScaleFunction · 0.80
PrepareCullingMethod · 0.80
makeModelMatrixMethod · 0.80
PrepareCullingMethod · 0.80
makeModelMatrixMethod · 0.80

Calls 1

multiplyMatriciesFunction · 0.85

Tested by 1

TestMatrixScaleFunction · 0.64