Data update
This commit is contained in:
parent
ed705008a8
commit
0df55f9f24
2196 changed files with 32999 additions and 3075 deletions
|
|
@ -14,9 +14,9 @@ fn Sphere(comptime T: type) type {
|
|||
pub fn hit(self: *const Self, xx: T, yy: T) ?SphereHit(T) {
|
||||
const x = xx - self.cx;
|
||||
const y = yy - self.cy;
|
||||
var zsq = self.r * self.r - x * x - y * y;
|
||||
const zsq = self.r * self.r - x * x - y * y;
|
||||
if (zsq >= 0) {
|
||||
var zsqrt = std.math.sqrt(zsq);
|
||||
const zsqrt = std.math.sqrt(zsq);
|
||||
return .{ .z1 = self.cz - zsqrt, .z2 = self.cz + zsqrt };
|
||||
}
|
||||
return null;
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ fn DeathStar(comptime T: type) type {
|
|||
const k: T = 1.5;
|
||||
const amb: T = 0.2;
|
||||
|
||||
var w: usize = @intFromFloat(pos.r * 4);
|
||||
var h: usize = @intFromFloat(pos.r * 3);
|
||||
const w: usize = @intFromFloat(pos.r * 4);
|
||||
const h: usize = @intFromFloat(pos.r * 3);
|
||||
var img = try ImageData().init(allocator, "deathStar", w, h);
|
||||
|
||||
var vec = Vector(T).zero();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue