• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

google / vector_math.dart / 17181727464

04 Aug 2025 07:19PM UTC coverage: 26.702% (+0.3%) from 26.388%
17181727464

push

github

web-flow
Bump min SDK to 3.7, update dependencies, reformat (#348)

496 of 1182 new or added lines in 55 files covered. (41.96%)

18 existing lines in 8 files now uncovered.

4463 of 16714 relevant lines covered (26.7%)

1.18 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/lib/src/vector_math_64/utilities.dart
1
// Copyright (c) 2015, Google Inc. Please see the AUTHORS file for details.
2
// All rights reserved. Use of this source code is governed by a BSD-style
3
// license that can be found in the LICENSE file.
4

5
part of '../../vector_math_64.dart';
6

7
/// Convert [radians] to degrees.
8
double degrees(double radians) => radians * radians2Degrees;
×
9

10
/// Convert [degrees] to radians.
11
double radians(double degrees) => degrees * degrees2Radians;
×
12

13
/// Interpolate between [min] and [max] with the amount of [a] using a linear
14
/// interpolation. The computation is equivalent to the GLSL function mix.
15
double mix(double min, double max, double a) => min + a * (max - min);
×
16

17
/// Do a smooth step (hermite interpolation) interpolation with [edge0] and
18
/// [edge1] by [amount]. The computation is equivalent to the GLSL function
19
/// smoothstep.
20
double smoothStep(double edge0, double edge1, double amount) {
×
21
  final t = ((amount - edge0) / (edge1 - edge0)).clamp(0.0, 1.0).toDouble();
×
22

23
  return t * t * (3.0 - 2.0 * t);
×
24
}
25

26
/// Do a catmull rom spline interpolation with [edge0], [edge1], [edge2] and
27
/// [edge3] by [amount].
NEW
28
double catmullRom(
×
29
  double edge0,
30
  double edge1,
31
  double edge2,
32
  double edge3,
33
  double amount,
34
) =>
35
    0.5 *
×
36
    ((2.0 * edge1) +
×
37
        (-edge0 + edge2) * amount +
×
38
        (2.0 * edge0 - 5.0 * edge1 + 4.0 * edge2 - edge3) * (amount * amount) +
×
39
        (-edge0 + 3.0 * edge1 - 3.0 * edge2 + edge3) *
×
40
            (amount * amount * amount));
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc