Flutter Engine
The Flutter Engine
third_party
skia
src
utils
SkMatrix22.h
Go to the documentation of this file.
1
/*
2
* Copyright 2014 Google Inc.
3
*
4
* Use of this source code is governed by a BSD-style license that can be
5
* found in the LICENSE file.
6
*/
7
8
#ifndef SkMatrix22_DEFINED
9
#define SkMatrix22_DEFINED
10
11
#include "
include/core/SkPoint.h
"
12
13
class
SkMatrix
;
14
15
/** Find the Givens matrix G, which is the rotational matrix
16
* that rotates the vector h to the positive hoizontal axis.
17
* G * h = [hypot(h), 0]
18
*
19
* This is equivalent to
20
*
21
* SkScalar r = h.length();
22
* SkScalar r_inv = r ? SkScalarInvert(r) : 0;
23
* h.scale(r_inv);
24
* G->setSinCos(-h.fY, h.fX);
25
*
26
* but has better numerical stability by using (partial) hypot,
27
* and saves a multiply by not computing r.
28
*/
29
void
SkComputeGivensRotation
(
const
SkVector
&
h
,
SkMatrix
*
G
);
30
31
#endif
SkComputeGivensRotation
void SkComputeGivensRotation(const SkVector &h, SkMatrix *G)
Definition:
SkMatrix22.cpp:14
SkPoint.h
SkMatrix
Definition:
SkMatrix.h:54
h
SkScalar h
Definition:
pictureshadertile.cpp:30
G
Definition:
SkMD5.cpp:125
SkPoint
Definition:
SkPoint_impl.h:163
Generated on Sun Jun 23 2024 21:56:36 for Flutter Engine by
1.9.4