Home
last modified time | relevance | path

Searched refs:Vec2 (Results 1 – 10 of 10) sorted by relevance

/frameworks/base/packages/EasterEgg/src/com/android/egg/landroid/
DVec2.kt28 typealias Vec2 = Offset typealias
30 fun Vec2.str(fmt: String = "%+.2f"): String = "<$fmt,$fmt>".format(x, y) in str() method
32 fun Vec2(x: Float, y: Float): Vec2 = Offset(x, y) in str() method
34 fun Vec2.mag(): Float { in str() method
38 fun Vec2.distance(other: Vec2): Float { in distance() method
42 fun Vec2.angle(): Float { in Vec2() method
46 fun Vec2.dot(o: Vec2): Float { in Vec2() method
50 fun Vec2.product(f: Float): Vec2 { in product() method
51 return Vec2(x * f, y * f) in product()
54 fun Offset.Companion.makeWithAngleMag(a: Float, m: Float): Vec2 { in makeWithAngleMag()
[all …]
DUniverse.kt51 val orbitCenter: Vec2, in <lambda>()
53 pos: Vec2, in <lambda>()
73 velocity = Vec2.makeWithAngleMag(orbitAngle + PIf / 2f, speed) in <lambda>()
81 pos = orbitCenter + Vec2.makeWithAngleMag(orbitAngle, orbitRadius) in <lambda>()
108 Planet(orbitCenter = Vec2.Zero, radius = radius, pos = Vec2.Zero, speed = 0f) {
110 pos = Vec2.Zero
152 pos = star.pos + Vec2.makeWithAngleMag(thisPlanetFrac * PI2f, orbitRadius), in initTest()
173 ship.pos = planets.last().pos + Vec2(planets.first().radius * 1.5f, 0f) in initTest()
209 pos = star.pos + Vec2.makeWithAngleMag(rng.nextFloat() * PI2f, orbitRadius), in initRandom()
229 Vec2.makeWithAngleMag( in initRandom()
[all …]
DAutopilot.kt39 var leadingPos = Vec2.Zero in <lambda>()
40 var leadingVector = Vec2.Zero in <lambda>()
73 ship.thrust = Vec2.makeWithAngleMag(ship.angle, 1f) in <lambda>()
106 val relativeV: Vec2 = shipV - targetV in <lambda>()
120 Vec2.makeWithAngleMag( in <lambda>()
131 ship.thrust = Vec2.Zero in <lambda>()
138 ship.thrust = Vec2.makeWithAngleMag(ship.angle, 1.0f) in <lambda>()
151 ship.thrust = Vec2.makeWithAngleMag(ship.angle, decelThrust) in <lambda>()
DVisibleUniverse.kt98 center = Vec2.Zero, in ZoomedDrawScope()
150 drawCircle(color = star.color, radius = star.radius, center = Vec2.Zero) in drawStar()
154 rotateRad(radians = star.anim / 23f * PI2f, pivot = Vec2.Zero) { in drawStar()
170 rotateRad(radians = star.anim / -19f * PI2f, pivot = Vec2.Zero) { in drawStar()
230 val thrustPath = createPolygon(-3f, 3).also { it.translate(Vec2(-5f, 0f)) } in <lambda>()
252 if (thrust != Vec2.Zero) { in ZoomedDrawScope()
270 val v = landing.planet.pos + Vec2.makeWithAngleMag(landing.angle, landing.planet.radius) in ZoomedDrawScope()
297 if (opos != Vec2.Zero) drawLine(color, opos, pos, strokeWidth = size) in ZoomedDrawScope()
299 if (opos != Vec2.Zero) drawLine(color, opos, pos, strokeWidth = size / zoom) in ZoomedDrawScope()
324 var prev: Vec2 = positions[positions.size - 1] in ZoomedDrawScope()
[all …]
DPhysics.kt53 var pos = Vec2.Zero
54 var opos = Vec2.Zero
55 var velocity = Vec2.Zero
117 Vec2.makeWithAngleMag(p.pos.angle(), radius - p.radius) * (1f - softness) in solve()
DMainActivity.kt332 if (vec == Vec2.Zero) { in onCreate()
333 ship.thrust = Vec2.Zero in onCreate()
341 ship.thrust = Vec2.Zero in onCreate()
344 Vec2.makeWithAngleMag( in onCreate()
391 onStickChanged: (vector: Vec2) -> Unit in FlightStick()
393 val origin = remember { mutableStateOf(Vec2.Zero) } in FlightStick()
394 val target = remember { mutableStateOf(Vec2.Zero) } in FlightStick()
419 target.value = Vec2.Zero in FlightStick()
420 origin.value = Vec2.Zero in FlightStick()
422 onStickChanged(Vec2.Zero) in FlightStick()
[all …]
DPathTools.kt35 fun createPolygonPoints(radius: Float, sides: Int): List<Vec2> { in createPolygonPoints()
38 Vec2(radius * cos(angleStep * i), radius * sin(angleStep * i)) in createPolygonPoints()
DDreamUniverse.kt75 Vec2.makeWithAngleMag( in onAttachedToWindow()
/frameworks/compile/libbcc/bcinfo/BitReader_2_7/
DBitcodeReader.cpp2864 Value *Vec1, *Vec2, *Mask; in ParseFunctionBody() local
2866 getValue(Record, OpNum, Vec1->getType(), Vec2)) in ParseFunctionBody()
2871 I = new ShuffleVectorInst(Vec1, Vec2, Mask); in ParseFunctionBody()
/frameworks/compile/libbcc/bcinfo/BitReader_3_0/
DBitcodeReader.cpp3125 Value *Vec1, *Vec2, *Mask; in ParseFunctionBody() local
3127 getValue(Record, OpNum, Vec1->getType(), Vec2)) in ParseFunctionBody()
3132 I = new ShuffleVectorInst(Vec1, Vec2, Mask); in ParseFunctionBody()