This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const m1 = 0.1593017578125; | |
const m2 = 78.84375; | |
const c1 = 0.8359375; | |
const c2 = 18.851525; | |
const c3 = 18.6875; | |
double inversePq(double n) { | |
final top = max( | |
pow(n, 1 / m2) - c1, | |
0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// --------------------------------------------------------------------------------------------------------------------------------------- | |
// ITU-R BT.2446 Conversion Method C | |
// https://www.itu.int/pub/R-REP-BT.2446 | |
//!HOOK OUTPUT | |
//!BIND HOOKED | |
//!DESC tone mapping (bt.2446c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:ffi'; | |
import 'dart:io'; | |
import 'dart:math'; | |
import 'package:ffi/ffi.dart'; | |
import 'package:sdl2/sdl2.dart'; | |
class FontData { | |
FontData(this.fontSource, this.fontSize); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% sudo v main.v -prod -os windows -arch amd64 -cflags -I./bin | |
Cross compiling for Windows... | |
In file included from ./bin/SDL.h:78, | |
from /tmp/v_0/main.11578763869071359096.tmp.c:823: | |
./bin/SDL3/SDL_oldnames.h:544:24: error: 'SDL_FIRSTEVENT_renamed_SDL_EVENT_FIRS' undeclared here (not in a function) | |
544 | #define SDL_FIRSTEVENT SDL_FIRSTEVENT_renamed_SDL_EVENT_FIRST | |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/tmp/v_0/main.11578763869071359096.tmp.c:1116:38: note: in expansion of macro 'SDL_FIRSTEVENT' | |
1116 | sdl__EventType__firstevent = SDL_FIRSTEVENT, // SDL_FIRSTEVENT | |
| ^~~~~~~~~~~~~~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:math'; | |
import 'package:fl_chart/fl_chart.dart'; | |
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import x.ttf | |
import stbi | |
fn main() { | |
mut ttf_font := ttf.TTF_File{} | |
ttf_font.buf = os.read_bytes('assets/fonts/ALS-Script.ttf') or { panic(err) } | |
ttf_font.init() | |
// print font info | |
println(ttf_font.get_info_string()) |